From 4c50e36cee4fa2865c9ec56b1abe3227e176b5c5 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Tue, 9 Aug 2011 15:56:07 +0200 Subject: [PATCH] Fix stack check when L->top is above L->maxstack. --- src/lj_state.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lj_state.h b/src/lj_state.h index d8d6104e..4f6b0a37 100644 --- a/src/lj_state.h +++ b/src/lj_state.h @@ -21,8 +21,8 @@ LJ_FUNC void LJ_FASTCALL lj_state_growstack1(lua_State *L); static LJ_AINLINE void lj_state_checkstack(lua_State *L, MSize need) { - if ((MSize)(mref(L->maxstack, char) - (char *)L->top) <= - need*(MSize)sizeof(TValue)) + if ((mref(L->maxstack, char) - (char *)L->top) <= + need*(ptrdiff_t)sizeof(TValue)) lj_state_growstack(L, need); }