From 171dcd7d745566e69c61845599705707500a104e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 7 Oct 2020 10:42:00 -0300 Subject: 'recover' finish of 'luaD_pcall' should follow the original --- ldo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ldo.c') diff --git a/ldo.c b/ldo.c index 3202490e..5729b190 100644 --- a/ldo.c +++ b/ldo.c @@ -641,11 +641,11 @@ static int recover (lua_State *L, int status) { if (ci == NULL) return 0; /* no recovery point */ /* "finish" luaD_pcall */ oldtop = restorestack(L, ci->u2.funcidx); - luaF_close(L, oldtop, status); /* may change the stack */ - oldtop = restorestack(L, ci->u2.funcidx); - luaD_seterrorobj(L, status, oldtop); L->ci = ci; L->allowhook = getoah(ci->callstatus); /* restore original 'allowhook' */ + status = luaF_close(L, oldtop, status); /* may change the stack */ + oldtop = restorestack(L, ci->u2.funcidx); + luaD_seterrorobj(L, status, oldtop); luaD_shrinkstack(L); /* restore stack size in case of overflow */ L->errfunc = ci->u.c.old_errfunc; return 1; /* continue running the coroutine */ -- cgit v1.2.3-55-g6feb