Skip to content

Commit

Permalink
SCUMM: pop stack in v0 if command's object1 and 2 are the same
Browse files Browse the repository at this point in the history
Otherwise the command will never be removed and the stack overflows
  • Loading branch information
tobigun committed Feb 11, 2012
1 parent e14bc5f commit e89dd62
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion engines/scumm/script.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit e89dd62

Please sign in to comment.