diff options
Diffstat (limited to '')
| -rw-r--r-- | lstate.c | 2 |
1 files changed, 2 insertions, 0 deletions
| @@ -326,6 +326,8 @@ LUA_API int lua_closethread (lua_State *L, lua_State *from) { | |||
| 326 | lua_lock(L); | 326 | lua_lock(L); |
| 327 | L->nCcalls = (from) ? getCcalls(from) : 0; | 327 | L->nCcalls = (from) ? getCcalls(from) : 0; |
| 328 | status = luaE_resetthread(L, L->status); | 328 | status = luaE_resetthread(L, L->status); |
| 329 | if (L == from) /* closing itself? */ | ||
| 330 | luaD_throwbaselevel(L, status); | ||
| 329 | lua_unlock(L); | 331 | lua_unlock(L); |
| 330 | return APIstatus(status); | 332 | return APIstatus(status); |
| 331 | } | 333 | } |
