From e89dd623ef2f44bac2768327da7faeef0e2c6f5b Mon Sep 17 00:00:00 2001 From: Tobias Gunkel Date: Tue, 10 Jan 2012 23:39:13 +0100 Subject: 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 --- engines/scumm/script.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines') 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; -- cgit v1.2.3