1
0
mirror of https://github.com/lua/lua synced 2026-06-08 15:34:49 +00:00

Detail in 'luaD_inctop'

Protect stack top before possible stack reallocation. (In the current
implementation, a stack reallocation cannot call an emergency
collection, so there is no bug, but it is safer not to depend on that.)
This commit is contained in:
Roberto Ierusalimschy
2024-12-17 13:36:12 -03:00
parent 1c40ff9faa
commit f81d0bbd4f
+1 -1
View File
@@ -373,8 +373,8 @@ void luaD_shrinkstack (lua_State *L) {
void luaD_inctop (lua_State *L) {
luaD_checkstack(L, 1);
L->top.p++;
luaD_checkstack(L, 1);
}
/* }================================================================== */