diff --git a/src/scripting/vm/jit_flow.cpp b/src/scripting/vm/jit_flow.cpp index 6371be6c3..c0359f2ea 100644 --- a/src/scripting/vm/jit_flow.cpp +++ b/src/scripting/vm/jit_flow.cpp @@ -403,7 +403,7 @@ void JitCompiler::ThrowArrayOutOfBounds(VMScriptFunction *func, VMOP *line, int { try { - if (index > size) + if (index >= size) { ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "Max.index = %u, current index = %u\n", size, index); }