diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-10-07 10:42:00 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-10-12 12:29:09 -0300 |
| commit | 171dcd7d745566e69c61845599705707500a104e (patch) | |
| tree | 129d0c97107e75e2308ab93d4100cc089ec2a5c4 /ldo.c | |
| parent | 5aa36e894f5a0348dfd19bd9cdcdd27ce8aa5f05 (diff) | |
| download | lua-171dcd7d745566e69c61845599705707500a104e.tar.gz lua-171dcd7d745566e69c61845599705707500a104e.tar.bz2 lua-171dcd7d745566e69c61845599705707500a104e.zip | |
'recover' finish of 'luaD_pcall' should follow the original
Diffstat (limited to 'ldo.c')
| -rw-r--r-- | ldo.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -641,11 +641,11 @@ static int recover (lua_State *L, int status) { | |||
| 641 | if (ci == NULL) return 0; /* no recovery point */ | 641 | if (ci == NULL) return 0; /* no recovery point */ |
| 642 | /* "finish" luaD_pcall */ | 642 | /* "finish" luaD_pcall */ |
| 643 | oldtop = restorestack(L, ci->u2.funcidx); | 643 | oldtop = restorestack(L, ci->u2.funcidx); |
| 644 | luaF_close(L, oldtop, status); /* may change the stack */ | ||
| 645 | oldtop = restorestack(L, ci->u2.funcidx); | ||
| 646 | luaD_seterrorobj(L, status, oldtop); | ||
| 647 | L->ci = ci; | 644 | L->ci = ci; |
| 648 | L->allowhook = getoah(ci->callstatus); /* restore original 'allowhook' */ | 645 | L->allowhook = getoah(ci->callstatus); /* restore original 'allowhook' */ |
| 646 | status = luaF_close(L, oldtop, status); /* may change the stack */ | ||
| 647 | oldtop = restorestack(L, ci->u2.funcidx); | ||
| 648 | luaD_seterrorobj(L, status, oldtop); | ||
| 649 | luaD_shrinkstack(L); /* restore stack size in case of overflow */ | 649 | luaD_shrinkstack(L); /* restore stack size in case of overflow */ |
| 650 | L->errfunc = ci->u.c.old_errfunc; | 650 | L->errfunc = ci->u.c.old_errfunc; |
| 651 | return 1; /* continue running the coroutine */ | 651 | return 1; /* continue running the coroutine */ |
