Uses a signed char instead of a char for opcode stack offset. On some platforms like ARM, char is unsigned by default

This fixes #311 where a memory corruption that occurred in ARM was caused because of insufficient ScriptVM stack size. The stack size was incorrectly calculated because the stack offset was using unsigned values instead of signed in ARM.
This commit is contained in:
smallmodel 2024-06-22 19:17:58 +02:00
parent 2f48ca6adb
commit 13197acb3a
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512
3 changed files with 3 additions and 3 deletions

View file

@ -77,7 +77,7 @@ public:
void Reset();
unsigned char PrevOpcode();
char PrevVarStackOffset();
signed char PrevVarStackOffset();
void AbsorbPrevOpcode();
void ClearPrevOpcode();
void AccumulatePrevOpcode(int opcode, int iVarStackOffset);