From e7dd3b51548ec0445a448895d52fb60958ce0a16 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 23 May 2017 16:23:49 +1000 Subject: src/ldo.js: Don't want to call user's message handler with a 'this' of CallInfo --- src/ldo.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ldo.js b/src/ldo.js index 4ed8380..ab3f197 100644 --- a/src/ldo.js +++ b/src/ldo.js @@ -396,7 +396,8 @@ const finishCcall = function(L, status) { /* finish 'lua_callk'/'lua_pcall'; CIST_YPCALL and 'errfunc' already handled */ if (ci.nresults === defs.LUA_MULTRET && L.ci.top < L.top) L.ci.top = L.top; - let n = ci.c_k(L, status, ci.c_ctx); /* call continuation function */ + let c_k = ci.c_k; /* don't want to call as method */ + let n = c_k(L, status, ci.c_ctx); /* call continuation function */ assert(n < (L.top - L.ci.funcOff), "not enough elements in the stack"); luaD_poscall(L, ci, L.top - n, n); /* finish 'luaD_precall' */ }; -- cgit v1.2.3-70-g09d2