From 2eb67edd0f48d60ff63207c7a561824d57cf0486 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Tue, 15 Feb 2011 23:57:07 +0100 Subject: SKY: Fix array access in debug code. The script data is already byteswapped at load time. --- engines/sky/debug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/sky/debug.cpp b/engines/sky/debug.cpp index b43ec917fe..2839665ff8 100644 --- a/engines/sky/debug.cpp +++ b/engines/sky/debug.cpp @@ -1071,11 +1071,11 @@ void Debug::logic(uint32 logic) { void Debug::script(uint32 command, uint16 *scriptData) { debug(6, "SCRIPT: %s", opcodes[command]); if (command == 0 || command == 6) - debug(6, " %s", scriptVars[READ_LE_UINT16(scriptData)/4]); + debug(6, " %s", scriptVars[(*scriptData)/4]); else { int i; for (i = 0; i < opcode_par[command]; i++) { - debug(6, " %d", READ_LE_UINT16(scriptData + i)); + debug(6, " %d", *(scriptData + i)); } } debug(6, " "); // Print an empty line as separator -- cgit v1.2.3