aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-01-13 15:46:36 +0000
committerMatthew Wild <mwild1@gmail.com>2012-01-13 15:46:36 +0000
commite898c683046c6ed14c3f3565418578661b986821 (patch)
tree911dc357b94a787f57d471c66060a43c53baecbe
parent351b8347c855bf3bef851bf2aa28b4dc73f21743 (diff)
downloadprosody-e898c683046c6ed14c3f3565418578661b986821.tar.gz
prosody-e898c683046c6ed14c3f3565418578661b986821.zip
util.debug: Adjust level within get_locals_table() to account for the additional depth of this function itself
-rw-r--r--util/debug.lua1
1 files changed, 1 insertions, 0 deletions
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);