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:
Colin Snover 2017-11-29 23:40:33 -06:00 committed by Eugene Sandulenko
parent b166746b9c
commit 9d10a998ae

View File

@ -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;