From 4a3195e49226715e3fe712497f904b27d5e410ea Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 12 May 2017 12:59:31 +1000 Subject: src/ldebug.js: Off by one error on symbolic execution Fixes #29 --- src/ldebug.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3-70-g09d2