aboutsummaryrefslogtreecommitdiff
path: root/nomsu.lua
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-04-09 19:45:38 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-04-09 19:45:43 -0700
commitab8ccf4e274d7a4fbb5d95e0fc20b71bafbc98dc (patch)
tree17c5c0e4e70e74905cc9467398502f80959d9fc6 /nomsu.lua
parentd42d20c50ae0443e2ac5ffa6492ad57745e27830 (diff)
Off by one error.
Diffstat (limited to 'nomsu.lua')
-rw-r--r--nomsu.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/nomsu.lua b/nomsu.lua
index b79bfeb..204d939 100644
--- a/nomsu.lua
+++ b/nomsu.lua
@@ -1743,7 +1743,7 @@ if arg and debug_getinfo(2).func ~= require then
info.short_src, info.linedefined = filename, line_no
info.currentline = line_no
if type(select(1, ...)) == 'number' then
- local varname, callsite = debug.getlocal(select(1, ...), 1)
+ local varname, callsite = debug.getlocal(select(1, ...) - 1, 1)
if varname == "__callsite" then
info.short_src, info.currentline = callsite:match("^(.*):(%d+)$")
info.currentline = tonumber(info.currentline)