mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-08 23:05:46 +00:00
Fix out of bounds check to not allow indexing 1 too far in members array
This commit is contained in:
@@ -1332,7 +1332,7 @@ ShaderVariable Debugger::MakeCompositePointer(const ShaderVariable &base, Id id,
|
||||
while(i < indices.size() && !leaf->members.empty())
|
||||
{
|
||||
uint32_t idx = indices[i++];
|
||||
if(idx > leaf->members.size())
|
||||
if(idx >= leaf->members.size())
|
||||
{
|
||||
apiWrapper->AddDebugMessage(
|
||||
MessageCategory::Execution, MessageSeverity::High, MessageSource::RuntimeWarning,
|
||||
|
||||
Reference in New Issue
Block a user