lua

A copy of the Lua development repository
Log | Files | Refs | README

commit f81d0bbd4f940399eb4b68845802bc3fe1cad73a
parent 1c40ff9faafed620aa0458b397bcbfbe19e0f663
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Tue, 17 Dec 2024 13:35:45 -0300

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.)

Diffstat:
Mldo.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ldo.c b/ldo.c @@ -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); } /* }================================================================== */