diff --git a/util/debug.lua b/util/debug.lua index 20d49720e..4c924d40d 100644 --- a/util/debug.lua +++ b/util/debug.lua @@ -31,7 +31,7 @@ local function get_locals_table(thread, level) for local_num = 1, math.huge do local name, value; if thread then - name, value = debug.getlocal(thread, level-1, local_num); + name, value = debug.getlocal(thread, level, local_num); else name, value = debug.getlocal(level+1, local_num); end