From 667b367b5f254920466b95bcb70cfe03560664a3 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 16 Oct 2020 13:38:04 +0100 Subject: util.debug: Fix locals being reported under wrong stack frame in some cases (+tests!!) --- util/debug.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/debug.lua') diff --git a/util/debug.lua b/util/debug.lua index 9a28395a..4c924d40 100644 --- a/util/debug.lua +++ b/util/debug.lua @@ -104,7 +104,7 @@ local function get_traceback_table(thread, start_level) levels[(level-start_level)+1] = { level = level; info = info; - locals = get_locals_table(thread, level+(thread and 0 or 1)); + locals = get_locals_table(thread, level+1); upvalues = get_upvalues_table(info.func); }; end -- cgit v1.2.3