SCUMM: Cleanup

We only need to initialize 'args' in runInventoryScript() when we
are actually using them.
This commit is contained in:
Torbjörn Andersson 2013-04-30 22:46:36 +02:00
parent 2284aba719
commit 0638d85ada

View file

@ -755,13 +755,13 @@ void ScummEngine::stopObjectCode() {
}
void ScummEngine::runInventoryScript(int i) {
int args[NUM_SCRIPT_LOCALS];
memset(args, 0, sizeof(args));
args[0] = i;
if (VAR(VAR_INVENTORY_SCRIPT)) {
if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformMacintosh) {
inventoryScriptIndy3Mac();
} else {
int args[NUM_SCRIPT_LOCALS];
memset(args, 0, sizeof(args));
args[0] = i;
runScript(VAR(VAR_INVENTORY_SCRIPT), 0, 0, args);
}
}