diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/lua-script.cpp | 7 | ||||
-rw-r--r-- | engines/hdb/lua-script.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index 5259c10932..08d5f77fa6 100644 --- a/engines/hdb/lua-script.cpp +++ b/engines/hdb/lua-script.cpp @@ -960,6 +960,13 @@ void LuaScript::checkParameters(const char *func, int params) { } } +void lua_printstack(lua_State *L) { + int n = lua_gettop(L); + for (int i = 1; i <= n; i++) { + debug(1, "STACK %d %s %s", i, lua_tostring(L, i), luaL_typename(L, i)); + } +} + const char *LuaScript::getStringOffStack() { if (!_systemInit) { return NULL; diff --git a/engines/hdb/lua-script.h b/engines/hdb/lua-script.h index 20cd94d331..32830b3c11 100644 --- a/engines/hdb/lua-script.h +++ b/engines/hdb/lua-script.h @@ -60,6 +60,8 @@ private: void addPatches(Common::String &chunk, const char *scriptName); }; +void lua_printstack(lua_State *L); + } #endif // !HDB_LUA_SCRIPT_H |