aboutsummaryrefslogtreecommitdiff
path: root/src/ldebug.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-12 12:59:31 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-12 12:59:31 +1000
commit4a3195e49226715e3fe712497f904b27d5e410ea (patch)
tree8847f98a2bf8a2ea4c75d9a503b4104dc1c853b3 /src/ldebug.js
parentfd0e17057364c468fb53b1a23478eeb25a95e525 (diff)
downloadfengari-4a3195e49226715e3fe712497f904b27d5e410ea.tar.gz
fengari-4a3195e49226715e3fe712497f904b27d5e410ea.tar.bz2
fengari-4a3195e49226715e3fe712497f904b27d5e410ea.zip
src/ldebug.js: Off by one error on symbolic execution
Fixes #29
Diffstat (limited to 'src/ldebug.js')
-rw-r--r--src/ldebug.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ldebug.js b/src/ldebug.js
index 2369595..b26a62f 100644
--- a/src/ldebug.js
+++ b/src/ldebug.js
@@ -531,7 +531,7 @@ const varinfo = function(L, o) {
kind = getupvalname(L, ci, o); /* check whether 'o' is an upvalue */
let stkid = isinstack(L, ci, o);
if (!kind && stkid) /* no? try a register */
- kind = getobjname(ci.func.value.p, ci.pcOff, stkid - ci.l_base);
+ kind = getobjname(ci.func.value.p, ci.pcOff - 1, stkid - ci.l_base);
}
return kind ? lobject.luaO_pushfstring(L, defs.to_luastring(" (%s '%s')", true), kind.funcname, kind.name) : defs.to_luastring("", true);