aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-10-16 13:38:04 +0100
committerMatthew Wild <mwild1@gmail.com>2020-10-16 13:38:04 +0100
commita095a0c533b6428dc513c27d8b1b3eb6c72a14af (patch)
tree4360475ea050f1f8107027daa7797fd89e9264c0 /util
parent20fc0c9c153bf5f25c924daa5e6cf988f9d3c2ff (diff)
downloadprosody-a095a0c533b6428dc513c27d8b1b3eb6c72a14af.tar.gz
prosody-a095a0c533b6428dc513c27d8b1b3eb6c72a14af.zip
util.debug: Fix locals being reported under wrong stack frame in some cases (+tests!!)
Diffstat (limited to 'util')
-rw-r--r--util/debug.lua2
1 files changed, 1 insertions, 1 deletions
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