aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/lua-script.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2019-06-20 12:38:32 +0200
committerEugene Sandulenko2019-09-03 17:16:51 +0200
commit641c2a91796a4fbfecc80652b3dbfb0a597f02eb (patch)
treebf543959fc58c829f3a840e8ec32b2e95e8d39eb /engines/hdb/lua-script.cpp
parent8810def2b257601d61013bb255d87521910c47e5 (diff)
downloadscummvm-rg350-641c2a91796a4fbfecc80652b3dbfb0a597f02eb.tar.gz
scummvm-rg350-641c2a91796a4fbfecc80652b3dbfb0a597f02eb.tar.bz2
scummvm-rg350-641c2a91796a4fbfecc80652b3dbfb0a597f02eb.zip
HDB: Added Lua print stack utility function
Diffstat (limited to 'engines/hdb/lua-script.cpp')
-rw-r--r--engines/hdb/lua-script.cpp7
1 files changed, 7 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;