diff options
author | Eugene Sandulenko | 2017-02-22 15:38:24 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-02-22 15:38:24 +0100 |
commit | b36d5174067fecb87ab9c1b1881757fefbc300ae (patch) | |
tree | 1c867d8a962dc3d05729dc6f6d1c5ee8e93b642b | |
parent | bb4b96bcab8059044abbe25918005ea68150179b (diff) | |
download | scummvm-rg350-b36d5174067fecb87ab9c1b1881757fefbc300ae.tar.gz scummvm-rg350-b36d5174067fecb87ab9c1b1881757fefbc300ae.tar.bz2 scummvm-rg350-b36d5174067fecb87ab9c1b1881757fefbc300ae.zip |
DIRECTOR: Lingo: Fixed stack underflow in handler execution
-rw-r--r-- | engines/director/lingo/lingo-code.cpp | 4 | ||||
-rw-r--r-- | engines/director/lingo/lingo.cpp | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index ca04dce550..f976434064 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -142,7 +142,7 @@ void Lingo::pushVoid() { Datum Lingo::pop(void) { if (_stack.size() == 0) - error("stack underflow"); + assert(0); Datum ret = _stack.back(); _stack.pop_back(); @@ -1126,7 +1126,7 @@ void Lingo::call(Common::String name, int nargs) { void Lingo::c_procret() { if (!g_lingo->_callstack.size()) { - warning("Call stack underflow"); + warning("c_procret: Call stack underflow"); g_lingo->_returning = true; return; } diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp index 32a247a83f..91faf68c31 100644 --- a/engines/director/lingo/lingo.cpp +++ b/engines/director/lingo/lingo.cpp @@ -303,7 +303,6 @@ void Lingo::processEvent(LEvent event, ScriptType st, int entityId) { if (_handlers.contains(ENTITY_INDEX(event, entityId))) { call(_eventHandlerTypes[event], 0); // D4+ Events - pop(); } else if (_scripts[st].contains(entityId)) { executeScript(st, entityId); // D3 list of scripts. } else { |