mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03: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:
parent
2f48ca6adb
commit
13197acb3a
3 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue