aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-12-17 13:36:12 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-12-17 13:36:12 -0300
commitf81d0bbd4f940399eb4b68845802bc3fe1cad73a (patch)
tree8b8df7a6d3080d0c7a8bd1dc9e32c9c3e7d9276f /ldo.c
parent1c40ff9faafed620aa0458b397bcbfbe19e0f663 (diff)
downloadlua-f81d0bbd4f940399eb4b68845802bc3fe1cad73a.tar.gz
lua-f81d0bbd4f940399eb4b68845802bc3fe1cad73a.tar.bz2
lua-f81d0bbd4f940399eb4b68845802bc3fe1cad73a.zip
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 (limited to 'ldo.c')
-rw-r--r--ldo.c2
1 files changed, 1 insertions, 1 deletions
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) {
373 373
374 374
375void luaD_inctop (lua_State *L) { 375void luaD_inctop (lua_State *L) {
376 luaD_checkstack(L, 1);
377 L->top.p++; 376 L->top.p++;
377 luaD_checkstack(L, 1);
378} 378}
379 379
380/* }================================================================== */ 380/* }================================================================== */