diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -686,10 +686,8 @@ LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs, | |||
686 | if (likely(!errorstatus(status))) | 686 | if (likely(!errorstatus(status))) |
687 | lua_assert(status == L->status); /* normal end or yield */ | 687 | lua_assert(status == L->status); /* normal end or yield */ |
688 | else { /* unrecoverable error */ | 688 | else { /* unrecoverable error */ |
689 | status = luaF_close(L, L->stack, status); /* close all upvalues */ | ||
690 | L->status = cast_byte(status); /* mark thread as 'dead' */ | 689 | L->status = cast_byte(status); /* mark thread as 'dead' */ |
691 | luaD_seterrorobj(L, status, L->stack + 1); /* push error message */ | 690 | luaD_seterrorobj(L, status, L->top); /* push error message */ |
692 | L->ci = &L->base_ci; /* back to the original C level */ | ||
693 | L->ci->top = L->top; | 691 | L->ci->top = L->top; |
694 | } | 692 | } |
695 | *nresults = (status == LUA_YIELD) ? L->ci->u2.nyield | 693 | *nresults = (status == LUA_YIELD) ? L->ci->u2.nyield |