diff options
-rw-r--r-- | src/ldebug.js | 2 |
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); |