This commit is contained in:
Cloud Wu
2020-11-04 10:48:35 +08:00
parent 902fb94274
commit f27930e7f7

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 += EXTRA_STACK; lim < newsize + EXTRA_STACK; lim++)
setnilvalue(s2v(newstack + lim)); /* erase new segment */
correctstack(L, L->stack, newstack);
L->stack = newstack;