aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTobias Gunkel2012-01-10 23:39:13 +0100
committerTobias Gunkel2012-02-11 08:28:35 +0100
commite89dd623ef2f44bac2768327da7faeef0e2c6f5b (patch)
treebb90300c5c015b177cdcbbb53ebb0136ea50e614 /engines
parente14bc5fd6d9df5157c841683e6e02f8d25cd8a2c (diff)
downloadscummvm-rg350-e89dd623ef2f44bac2768327da7faeef0e2c6f5b.tar.gz
scummvm-rg350-e89dd623ef2f44bac2768327da7faeef0e2c6f5b.tar.bz2
scummvm-rg350-e89dd623ef2f44bac2768327da7faeef0e2c6f5b.zip
SCUMM: pop stack in v0 if command's object1 and 2 are the same
Otherwise the command will never be removed and the stack overflows
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/script.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index ded47ad60a..eb0f7bf16a 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -1171,8 +1171,10 @@ void ScummEngine_v0::checkAndRunSentenceScript() {
SentenceTab &st = _sentence[_sentenceNum - 1];
- if (st.preposition && st.objectB == st.objectA)
+ if (st.preposition && st.objectB == st.objectA) {
+ _sentenceNum--;
return;
+ }
// FIXME: should this be executed?
//_currentScript = 0xFF;