aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorColin Snover2017-01-05 21:06:52 -0600
committerColin Snover2017-03-30 19:46:27 -0500
commitceacf7df12edbdce058f9124ea3639a490fd824b (patch)
tree972cd89aac1fab7251edcdeb38b5ef757145c9e4 /engines
parentf4d3664d3fb529a451ef57658b443fb1c878bdfa (diff)
downloadscummvm-rg350-ceacf7df12edbdce058f9124ea3639a490fd824b.tar.gz
scummvm-rg350-ceacf7df12edbdce058f9124ea3639a490fd824b.tar.bz2
scummvm-rg350-ceacf7df12edbdce058f9124ea3639a490fd824b.zip
SCI: Handle >64KiB offsets in parse_reg_t
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/console.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 16f59523b4..5c7a9e6d4a 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -4233,14 +4233,14 @@ static int parse_reg_t(EngineState *s, const char *str, reg_t *dest, bool mayBeV
relativeOffset = true;
if (!scumm_strnicmp(str + 1, "PC", 2)) {
- // TODO: Handle 32-bit PC addresses
reg32_t pc = s->_executionStack.back().addr.pc;
- *dest = make_reg(pc.getSegment(), (uint16)pc.getOffset());
+ dest->setSegment(pc.getSegment());
+ dest->setOffset(pc.getOffset());
offsetStr = str + 3;
} else if (!scumm_strnicmp(str + 1, "P", 1)) {
- // TODO: Handle 32-bit PC addresses
reg32_t pc = s->_executionStack.back().addr.pc;
- *dest = make_reg(pc.getSegment(), (uint16)pc.getOffset());
+ dest->setSegment(pc.getSegment());
+ dest->setOffset(pc.getOffset());
offsetStr = str + 2;
} else if (!scumm_strnicmp(str + 1, "PREV", 4)) {
*dest = s->r_prev;