mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-19 17:00:26 +02:00
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:
3 files changed
+3
-3
No files matched your search
@@ -77,7 +77,7 @@ unsigned char ScriptCompiler::PrevOpcode()
|
||||
return prev_opcodes[prev_opcode_pos].opcode;
|
||||
}
|
||||
|
||||
char ScriptCompiler::PrevVarStackOffset()
|
||||
signed char ScriptCompiler::PrevVarStackOffset()
|
||||
{
|
||||
return prev_opcodes[prev_opcode_pos].VarStackOffset;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user