From 8eba0e5ebdb9a49deaa9ce2768f07a89854a46d7 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 13 Jan 2012 15:46:36 +0000 Subject: util.debug: Adjust level within get_locals_table() to account for the additional depth of this function itself --- util/debug.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'util/debug.lua') diff --git a/util/debug.lua b/util/debug.lua index 22d02bf2..2170a6d1 100644 --- a/util/debug.lua +++ b/util/debug.lua @@ -9,6 +9,7 @@ local censored_names = { }; local function get_locals_table(level) + level = level + 1; -- Skip this function itself local locals = {}; for local_num = 1, math.huge do local name, value = debug.getlocal(level, local_num); -- cgit v1.2.3