mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Gracefully handle lua_error() for a suspended coroutine.
Thanks to Sergei Zhirikov.
This commit is contained in:
parent
6fddb9bc2e
commit
c6e69249dd
@ -499,8 +499,7 @@ static ptrdiff_t finderrfunc(lua_State *L)
|
||||
{
|
||||
cTValue *frame = L->base-1, *bot = tvref(L->stack);
|
||||
void *cf = L->cframe;
|
||||
while (frame > bot) {
|
||||
lua_assert(cf != NULL);
|
||||
while (frame > bot && cf) {
|
||||
while (cframe_nres(cframe_raw(cf)) < 0) { /* cframe without frame? */
|
||||
if (frame >= restorestack(L, -cframe_nres(cf)))
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user