aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2010-11-24 21:32:34 +0000
committerFilippos Karapetis2010-11-24 21:32:34 +0000
commit169c6be32b99e898a3a52ba394ea6c025642e561 (patch)
tree455a9ba05fa45667232882da1d7c11eada56ba59 /engines
parentf5b1b9fa7521efe722ef3b530733412f624c9fe0 (diff)
downloadscummvm-rg350-169c6be32b99e898a3a52ba394ea6c025642e561.tar.gz
scummvm-rg350-169c6be32b99e898a3a52ba394ea6c025642e561.tar.bz2
scummvm-rg350-169c6be32b99e898a3a52ba394ea6c025642e561.zip
SCI: Fixed a bug in the script disassembler
svn-id: r54463
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/scriptdebug.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 1240e7410c..f1d08646d1 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -85,7 +85,7 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode
if (pos.offset >= scr_size) {
warning("Trying to disassemble beyond end of script");
- return pos;
+ return NULL_REG;
}
int16 opparams[4];
@@ -124,8 +124,9 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode
case Script_SByte:
case Script_Byte:
- param_value = scr[retval.offset++];
- debugN(" %02x", scr[retval.offset++]);
+ param_value = scr[retval.offset];
+ debugN(" %02x", scr[retval.offset]);
+ retval.offset++;
break;
case Script_Word: