]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix stack check in side exit.
authorMike Pall <mike>
Fri, 25 Nov 2011 18:36:48 +0000 (19:36 +0100)
committerMike Pall <mike>
Fri, 25 Nov 2011 18:36:48 +0000 (19:36 +0100)
src/lj_snap.c

index 89f739825d1d830dd1d0fd1892eb80f1fbdd1da2..10fd6af728d895bb8fe1c6cde55667227073a40a 100644 (file)
@@ -352,7 +352,7 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr)
   setcframe_pc(cframe_raw(L->cframe), pc+1);
 
   /* Make sure the stack is big enough for the slots from the snapshot. */
-  if (LJ_UNLIKELY(L->base + snap->topslot > tvref(L->maxstack))) {
+  if (LJ_UNLIKELY(L->base + snap->topslot >= tvref(L->maxstack))) {
     L->top = curr_topL(L);
     lj_state_growstack(L, snap->topslot - curr_proto(L)->framesize);
   }