aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/sciconsole.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine/sciconsole.cpp')
-rw-r--r--engines/sci/engine/sciconsole.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/engine/sciconsole.cpp b/engines/sci/engine/sciconsole.cpp
index 7bbe5f83c4..2a116506c2 100644
--- a/engines/sci/engine/sciconsole.cpp
+++ b/engines/sci/engine/sciconsole.cpp
@@ -221,10 +221,10 @@ int parse_reg_t(EngineState *s, const char *str, reg_t *dest) { // Returns 0 on
rel_offsetting = 1;
if (!scumm_strnicmp(str + 1, "PC", 2)) {
- *dest = s->_executionStack[s->execution_stack_pos].addr.pc;
+ *dest = s->_executionStack.back().addr.pc;
offsetting = str + 3;
} else if (!scumm_strnicmp(str + 1, "P", 1)) {
- *dest = s->_executionStack[s->execution_stack_pos].addr.pc;
+ *dest = s->_executionStack.back().addr.pc;
offsetting = str + 2;
} else if (!scumm_strnicmp(str + 1, "PREV", 4)) {
*dest = s->r_prev;
@@ -236,10 +236,10 @@ int parse_reg_t(EngineState *s, const char *str, reg_t *dest) { // Returns 0 on
*dest = s->r_acc;
offsetting = str + 2;
} else if (!scumm_strnicmp(str + 1, "OBJ", 3)) {
- *dest = s->_executionStack[s->execution_stack_pos].objp;
+ *dest = s->_executionStack.back().objp;
offsetting = str + 4;
} else if (!scumm_strnicmp(str + 1, "O", 1)) {
- *dest = s->_executionStack[s->execution_stack_pos].objp;
+ *dest = s->_executionStack.back().objp;
offsetting = str + 2;
} else
return 1; // No matching register