aboutsummaryrefslogtreecommitdiff
path: root/src/ldebug.js
diff options
context:
space:
mode:
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 be122e0..f6d0633 100644
--- a/src/ldebug.js
+++ b/src/ldebug.js
@@ -485,7 +485,7 @@ const luaG_errormsg = function(L) {
if (L.errfunc !== 0) { /* is there an error handling function? */
let errfunc = L.errfunc;
L.stack[L.top] = L.stack[L.top - 1];
- L.stack[L.top - 1] = errfunc;
+ L.stack[L.top - 1] = L.stack[errfunc];
L.top++;
ldo.luaD_callnoyield(L, L.top - 2, 1);
}