This commit is contained in:
Cloud Wu
2020-11-04 10:20:26 +08:00
parent 3f8a2f69df
commit cb445f17d4
2 changed files with 2 additions and 2 deletions

View File

@@ -191,7 +191,7 @@ int luaD_reallocstack (lua_State *L, int newsize, int raiseerror) {
luaM_error(L);
else return 0; /* do not raise an error */
}
for (; lim < newsize; lim++)
for (; lim < newsize + EXTRA_STACK; lim++)
setnilvalue(s2v(newstack + lim)); /* erase new segment */
correctstack(L, L->stack, newstack);
L->stack = newstack;