mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 19:32:11 +00:00
SCUMM: Fix stack overflow initializing locals
This happens when clicking on the triangular button in room 27 in The Dig. There are probably several other places where this overflow happens, since there are several different `int args[16]` in the code (and many more `int args[` of various sizes, not all of which are at least NUM_SCRIPT_LOCAL).
This commit is contained in:
parent
b166746b9c
commit
9d10a998ae
@ -768,7 +768,7 @@ void Actor::startWalkAnim(int cmd, int angle) {
|
||||
* work as usual
|
||||
*/
|
||||
if (_walkScript) {
|
||||
int args[16];
|
||||
int args[NUM_SCRIPT_LOCAL];
|
||||
memset(args, 0, sizeof(args));
|
||||
args[0] = _number;
|
||||
args[1] = cmd;
|
||||
|
Loading…
Reference in New Issue
Block a user