mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
Fixed an incorrect abort message on out of bounds array access.
This commit is contained in:
parent
54a630c3cf
commit
2e2ee33a98
2 changed files with 4 additions and 4 deletions
|
@ -310,7 +310,7 @@ void JitCompiler::ThrowArrayOutOfBounds(int index, int size)
|
|||
{
|
||||
if (index >= size)
|
||||
{
|
||||
ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "Max.index = %u, current index = %u\n", size, index);
|
||||
ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "Size = %u, current index = %u\n", size, index);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -806,7 +806,7 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret)
|
|||
OP(BOUND):
|
||||
if (reg.d[a] >= BC)
|
||||
{
|
||||
ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "Max.index = %u, current index = %u\n", BC, reg.d[a]);
|
||||
ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "Size = %u, current index = %u\n", BC, reg.d[a]);
|
||||
return 0;
|
||||
}
|
||||
else if (reg.d[a] < 0)
|
||||
|
@ -820,7 +820,7 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret)
|
|||
ASSERTKD(BC);
|
||||
if (reg.d[a] >= konstd[BC])
|
||||
{
|
||||
ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "Max.index = %u, current index = %u\n", konstd[BC], reg.d[a]);
|
||||
ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "Size = %u, current index = %u\n", konstd[BC], reg.d[a]);
|
||||
return 0;
|
||||
}
|
||||
else if (reg.d[a] < 0)
|
||||
|
@ -834,7 +834,7 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret)
|
|||
ASSERTD(B);
|
||||
if (reg.d[a] >= reg.d[B])
|
||||
{
|
||||
ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "Max.index = %u, current index = %u\n", reg.d[B], reg.d[a]);
|
||||
ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "Size = %u, current index = %u\n", reg.d[B], reg.d[a]);
|
||||
return 0;
|
||||
}
|
||||
else if (reg.d[a] < 0)
|
||||
|
|
Loading…
Reference in a new issue