Преглед на файлове

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.)
Roberto Ierusalimschy преди 7 месеца
родител
ревизия
f81d0bbd4f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      ldo.c

+ 1 - 1
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);
 }
 
 /* }================================================================== */