From 4a8ac583de5767b4352cc19489e83037268d4c58 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 28 Apr 2012 16:21:19 +0100 Subject: util.debug: Add +1 to level when getting locals table, to account for current function --- util/debug.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/debug.lua b/util/debug.lua index 321b3267..bff0e347 100644 --- a/util/debug.lua +++ b/util/debug.lua @@ -97,7 +97,7 @@ function get_traceback_table(thread, start_level) levels[(level-start_level)+1] = { level = level; info = info; - locals = get_locals_table(level); + locals = get_locals_table(level+1); upvalues = get_upvalues_table(info.func); }; end -- cgit v1.2.3