From 5e169fc1ed36d9cef5f021b1b8be8867902dbdbb Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 29 May 2017 14:02:34 +1000 Subject: src/ldo.js: Make sure to allocate TValue before assigning --- src/ldo.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/ldo.js b/src/ldo.js index 4c53f11..0f7a2d3 100644 --- a/src/ldo.js +++ b/src/ldo.js @@ -381,9 +381,8 @@ const luaD_rawrunprotected = function(L, f, ud) { /* copy of luaG_errormsg without the throw */ if (L.errfunc !== 0) { /* is there an error handling function? */ let errfunc = L.errfunc; - lobject.setobjs2s(L, L.top, L.top - 1); /* move argument */ + lobject.pushobj2s(L, L.stack[L.top - 1]); /* move argument */ lobject.setobjs2s(L, L.top - 1, errfunc); /* push function */ - L.top++; luaD_callnoyield(L, L.top - 2, 1); } -- cgit v1.2.3-70-g09d2