mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-09 00:01:07 +00:00
Fix crash in DXBCFile processing if array is last binding. Closes #919
This commit is contained in:
@@ -699,6 +699,10 @@ DXBCFile::DXBCFile(const void *ByteCode, size_t ByteCodeLength)
|
||||
// remove the array item, and get the iterator to the next item to process
|
||||
it = resArray.erase(it);
|
||||
|
||||
// if we're now pointing at the end of the vector, save that, as the iterator will be
|
||||
// invalid after we push back below.
|
||||
bool last = (it == resArray.end());
|
||||
|
||||
string rname = desc.name;
|
||||
uint32_t arraySize = desc.bindCount;
|
||||
|
||||
@@ -711,6 +715,10 @@ DXBCFile::DXBCFile(const void *ByteCode, size_t ByteCodeLength)
|
||||
desc.reg++;
|
||||
}
|
||||
|
||||
// if we just expanded the last item, break out of the loop
|
||||
if(last)
|
||||
break;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user