diff options
author | Eugene Sandulenko | 2019-06-20 16:09:35 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:52 +0200 |
commit | 630c6b44f8911a3444e4098091ae2907fa78eede (patch) | |
tree | 1aa4dc53d1e1d3e94ce1164e261a270c5666b71a | |
parent | 6c8dce6c17a967c2b5a9ae4f39380a670a454848 (diff) | |
download | scummvm-rg350-630c6b44f8911a3444e4098091ae2907fa78eede.tar.gz scummvm-rg350-630c6b44f8911a3444e4098091ae2907fa78eede.tar.bz2 scummvm-rg350-630c6b44f8911a3444e4098091ae2907fa78eede.zip |
HDB: Clean up Lua stack after script execution
-rw-r--r-- | engines/hdb/lua-script.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index e73e8facf4..75f8a41566 100644 --- a/engines/hdb/lua-script.cpp +++ b/engines/hdb/lua-script.cpp @@ -829,6 +829,9 @@ bool LuaScript::initScript(Common::SeekableReadStream *stream, const char *scrip return false; } + // Remove the error handler function from the stack + lua_pop(_state, 1); + return true; } @@ -942,6 +945,9 @@ bool LuaScript::executeChunk(Common::String &chunk, uint chunkSize, const Common return false; } + // Remove the error handler function from the stack + lua_pop(_state, 1); + return true; } |