mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix stack check when L->top is above L->maxstack.
This commit is contained in:
parent
bed0f18466
commit
4c50e36cee
@ -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)
|
static LJ_AINLINE void lj_state_checkstack(lua_State *L, MSize need)
|
||||||
{
|
{
|
||||||
if ((MSize)(mref(L->maxstack, char) - (char *)L->top) <=
|
if ((mref(L->maxstack, char) - (char *)L->top) <=
|
||||||
need*(MSize)sizeof(TValue))
|
need*(ptrdiff_t)sizeof(TValue))
|
||||||
lj_state_growstack(L, need);
|
lj_state_growstack(L, need);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user