diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -120,6 +120,7 @@ l_noret luaD_throw (lua_State *L, int errcode) { | |||
120 | else { /* thread has no error handler */ | 120 | else { /* thread has no error handler */ |
121 | global_State *g = G(L); | 121 | global_State *g = G(L); |
122 | errcode = luaE_resetthread(L, errcode); /* close all upvalues */ | 122 | errcode = luaE_resetthread(L, errcode); /* close all upvalues */ |
123 | L->status = errcode; | ||
123 | if (g->mainthread->errorJmp) { /* main thread has a handler? */ | 124 | if (g->mainthread->errorJmp) { /* main thread has a handler? */ |
124 | setobjs2s(L, g->mainthread->top.p++, L->top.p - 1); /* copy error obj. */ | 125 | setobjs2s(L, g->mainthread->top.p++, L->top.p - 1); /* copy error obj. */ |
125 | luaD_throw(g->mainthread, errcode); /* re-throw in main thread */ | 126 | luaD_throw(g->mainthread, errcode); /* re-throw in main thread */ |