From 94d5eb3873d2a5155ceeecbd2ff8c73853374c64 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 16 Jun 2017 17:47:38 +1000 Subject: src/ldebug.js: Use function offset as limit when finding local variable name --- src/ldebug.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ldebug.js b/src/ldebug.js index 532fd9c..dbd546d 100644 --- a/src/ldebug.js +++ b/src/ldebug.js @@ -116,7 +116,7 @@ const findlocal = function(L, ci, n) { base = ci.funcOff + 1; if (name === null) { /* no 'standard' name? */ - let limit = ci === L.ci ? L.top : ci.next.func; + let limit = ci === L.ci ? L.top : ci.next.funcOff; if (limit - base >= n && n > 0) /* is 'n' inside 'ci' stack? */ name = defs.to_luastring("(*temporary)", true); /* generic name for any valid slot */ else -- cgit v1.2.3-70-g09d2