aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/scriptdebug.cpp7
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);
}