Add assert for previous I_Error condition

This commit is contained in:
yqco 2016-08-11 04:47:17 -06:00
parent 054f5c963e
commit ee7d933ed6

View file

@ -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)