diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -118,6 +118,7 @@ l_noret luaD_throw (lua_State *L, int errcode) { | |||
118 | } | 118 | } |
119 | else { /* thread has no error handler */ | 119 | else { /* thread has no error handler */ |
120 | global_State *g = G(L); | 120 | global_State *g = G(L); |
121 | errcode = luaF_close(L, L->stack, errcode); /* close all upvalues */ | ||
121 | L->status = cast_byte(errcode); /* mark it as dead */ | 122 | L->status = cast_byte(errcode); /* mark it as dead */ |
122 | if (g->mainthread->errorJmp) { /* main thread has a handler? */ | 123 | if (g->mainthread->errorJmp) { /* main thread has a handler? */ |
123 | setobjs2s(L, g->mainthread->top++, L->top - 1); /* copy error obj. */ | 124 | setobjs2s(L, g->mainthread->top++, L->top - 1); /* copy error obj. */ |