mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
Add assert for previous I_Error condition
This commit is contained in:
parent
054f5c963e
commit
ee7d933ed6
1 changed files with 1 additions and 0 deletions
|
@ -3593,6 +3593,7 @@ ExpEmit FxArrayElement::Emit(VMFunctionBuilder *build)
|
|||
if (index->isConstant())
|
||||
{
|
||||
unsigned indexval = static_cast<FxConstant *>(index)->GetValue().GetInt();
|
||||
assert(indexval < arraytype->ElementCount && "Array index out of bounds");
|
||||
indexval *= arraytype->ElementSize;
|
||||
|
||||
if (AddressRequested)
|
||||
|
|
Loading…
Reference in a new issue