diff --git a/src/AREngine.cpp b/src/AREngine.cpp index bdda5863..0c37b321 100644 --- a/src/AREngine.cpp +++ b/src/AREngine.cpp @@ -58,7 +58,8 @@ void AREngine::RunCheat(const ARCode& arcode) for (;;) { - if (code >= &arcode.Code[arcode.Code.size()]) + if (code > &arcode.Code[arcode.Code.size() - 1]) + // If the instruction pointer is past the end of the cheat code... break; u32 a = *code++;