From f81d0bbd4f940399eb4b68845802bc3fe1cad73a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 17 Dec 2024 13:36:12 -0300 Subject: 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.) --- ldo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ldo.c') diff --git a/ldo.c b/ldo.c index 9459391f..f825d959 100644 --- 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); } /* }================================================================== */ -- cgit v1.2.3-55-g6feb