aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hdb/lua-script.cpp6
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;
}