diff options
Diffstat (limited to '')
| -rw-r--r-- | src/3rdParty/lua/lstate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/3rdParty/lua/lstate.c b/src/3rdParty/lua/lstate.c index bfc5902..5cb0847 100644 --- a/src/3rdParty/lua/lstate.c +++ b/src/3rdParty/lua/lstate.c | |||
| @@ -166,7 +166,7 @@ void luaE_checkcstack (lua_State *L) { | |||
| 166 | if (getCcalls(L) == LUAI_MAXCCALLS) | 166 | if (getCcalls(L) == LUAI_MAXCCALLS) |
| 167 | luaG_runerror(L, "C stack overflow"); | 167 | luaG_runerror(L, "C stack overflow"); |
| 168 | else if (getCcalls(L) >= (LUAI_MAXCCALLS / 10 * 11)) | 168 | else if (getCcalls(L) >= (LUAI_MAXCCALLS / 10 * 11)) |
| 169 | luaD_throw(L, LUA_ERRERR); /* error while handing stack error */ | 169 | luaD_throw(L, LUA_ERRERR); /* error while handling stack error */ |
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | 172 | ||
| @@ -330,13 +330,13 @@ int luaE_resetthread (lua_State *L, int status) { | |||
| 330 | ci->callstatus = CIST_C; | 330 | ci->callstatus = CIST_C; |
| 331 | if (status == LUA_YIELD) | 331 | if (status == LUA_YIELD) |
| 332 | status = LUA_OK; | 332 | status = LUA_OK; |
| 333 | L->status = LUA_OK; /* so it can run __close metamethods */ | ||
| 333 | status = luaD_closeprotected(L, 1, status); | 334 | status = luaD_closeprotected(L, 1, status); |
| 334 | if (status != LUA_OK) /* errors? */ | 335 | if (status != LUA_OK) /* errors? */ |
| 335 | luaD_seterrorobj(L, status, L->stack + 1); | 336 | luaD_seterrorobj(L, status, L->stack + 1); |
| 336 | else | 337 | else |
| 337 | L->top = L->stack + 1; | 338 | L->top = L->stack + 1; |
| 338 | ci->top = L->top + LUA_MINSTACK; | 339 | ci->top = L->top + LUA_MINSTACK; |
| 339 | L->status = cast_byte(status); | ||
| 340 | luaD_reallocstack(L, cast_int(ci->top - L->stack), 0); | 340 | luaD_reallocstack(L, cast_int(ci->top - L->stack), 0); |
| 341 | return status; | 341 | return status; |
| 342 | } | 342 | } |
