From 0638d85ada88ed7115d96e06216f9daea563d9ac Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Tue, 30 Apr 2013 22:46:36 +0200 Subject: SCUMM: Cleanup We only need to initialize 'args' in runInventoryScript() when we are actually using them. --- engines/scumm/script.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/scumm') diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp index 59dfc229f2..d025ede47b 100644 --- a/engines/scumm/script.cpp +++ b/engines/scumm/script.cpp @@ -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); } } -- cgit v1.2.3