diff options
author | Colin Snover | 2017-02-16 20:19:25 -0600 |
---|---|---|
committer | Colin Snover | 2017-04-23 13:07:25 -0500 |
commit | 0676e640dbebbe2f49aab902454b99693b1bb560 (patch) | |
tree | 4e8ef88f6e7a5d89bf9889e2adf46db76a827965 /engines | |
parent | 6b95528b49e40117a309dab8cb593d140c783cf4 (diff) | |
download | scummvm-rg350-0676e640dbebbe2f49aab902454b99693b1bb560.tar.gz scummvm-rg350-0676e640dbebbe2f49aab902454b99693b1bb560.tar.bz2 scummvm-rg350-0676e640dbebbe2f49aab902454b99693b1bb560.zip |
SCI: Fix bad offsets in disassembly for SCI3 lofsa/lofss
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/scriptdebug.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 507fd97795..52281e228c 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -225,9 +225,12 @@ reg_t disassemble(EngineState *s, reg32_t pos, reg_t objAddr, bool printBWTag, b } if (opcode == op_lofsa || opcode == op_lofss) { - reg_t addr = make_reg(pos.getSegment(), findOffset(param_value, script_entity, pos.getOffset())); + const uint32 offset = findOffset(param_value, script_entity, retval.getOffset()); + reg_t addr; + addr.setSegment(retval.getSegment()); + addr.setOffset(offset); debugN("\t%s", s->_segMan->getObjectName(addr)); - debugN(opsize ? "[%02x]" : "[%04x]", param_value); + debugN(opsize ? "[%02x]" : "[%04x]", offset); } else { debugN(opsize ? "\t%02x" : "\t%04x", param_value); } |