aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/console.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2015-05-14 16:45:53 +0200
committerWillem Jan Palenstijn2015-05-14 16:45:53 +0200
commit8466c0f08da9b00408e6829ee948a62ec411de9d (patch)
treedda6c29d988a9378bb52d69538e40a507f9835c1 /engines/sci/console.cpp
parent2e8e85310d245f273bb7c89c01d8eb5f0491c639 (diff)
downloadscummvm-rg350-8466c0f08da9b00408e6829ee948a62ec411de9d.tar.gz
scummvm-rg350-8466c0f08da9b00408e6829ee948a62ec411de9d.tar.bz2
scummvm-rg350-8466c0f08da9b00408e6829ee948a62ec411de9d.zip
SCI: Restore xs after calling run_vm from debugger
This fixes possible gamestate corruption when using 'send' in the debugger to call methods.
Diffstat (limited to 'engines/sci/console.cpp')
-rw-r--r--engines/sci/console.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index bc9ad362ab..dc017a7a70 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -3374,6 +3374,7 @@ bool Console::cmdSend(int argc, const char **argv) {
// We call run_engine explictly so we can restore the value of r_acc
// after execution.
run_vm(_engine->_gamestate);
+ _engine->_gamestate->xs = old_xstack;
}