mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +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())
|
if (index->isConstant())
|
||||||
{
|
{
|
||||||
unsigned indexval = static_cast<FxConstant *>(index)->GetValue().GetInt();
|
unsigned indexval = static_cast<FxConstant *>(index)->GetValue().GetInt();
|
||||||
|
assert(indexval < arraytype->ElementCount && "Array index out of bounds");
|
||||||
indexval *= arraytype->ElementSize;
|
indexval *= arraytype->ElementSize;
|
||||||
|
|
||||||
if (AddressRequested)
|
if (AddressRequested)
|
||||||
|
|
Loading…
Reference in a new issue