diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-12-17 13:36:12 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-12-17 13:36:12 -0300 |
commit | f81d0bbd4f940399eb4b68845802bc3fe1cad73a (patch) | |
tree | 8b8df7a6d3080d0c7a8bd1dc9e32c9c3e7d9276f /ldo.c | |
parent | 1c40ff9faafed620aa0458b397bcbfbe19e0f663 (diff) | |
download | lua-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -373,8 +373,8 @@ void luaD_shrinkstack (lua_State *L) { | |||
373 | 373 | ||
374 | 374 | ||
375 | void luaD_inctop (lua_State *L) { | 375 | void 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 | /* }================================================================== */ |