aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Milburn2011-02-15 23:57:07 +0100
committerAlyssa Milburn2011-02-16 00:05:15 +0100
commit2eb67edd0f48d60ff63207c7a561824d57cf0486 (patch)
tree61f44525b0de1a8b66b5f5037990803ea0727a47
parentea857a6f804d324722379f15826ead63282a5c1b (diff)
downloadscummvm-rg350-2eb67edd0f48d60ff63207c7a561824d57cf0486.tar.gz
scummvm-rg350-2eb67edd0f48d60ff63207c7a561824d57cf0486.tar.bz2
scummvm-rg350-2eb67edd0f48d60ff63207c7a561824d57cf0486.zip
SKY: Fix array access in debug code.
The script data is already byteswapped at load time.
-rw-r--r--engines/sky/debug.cpp4
1 files 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