diff --git a/src/AREngine.cpp b/src/AREngine.cpp index 760ca398..ab3969ac 100644 --- a/src/AREngine.cpp +++ b/src/AREngine.cpp @@ -95,6 +95,12 @@ void ParseTextCode(char* text, u32* code, int len) // or whatever this should be if (nout & 1) { printf("AR: code was missing one word??\n"); + if (nout >= len) + { + // OH SHIT SHIT SHIT SHIT + printf("AR: code too long!\n"); + return; + } *code++ = 0; } }