diff --git a/luprex/eris-master/src/lapi.c b/luprex/eris-master/src/lapi.c index 6b3d1181..a7664702 100644 --- a/luprex/eris-master/src/lapi.c +++ b/luprex/eris-master/src/lapi.c @@ -909,15 +909,15 @@ LUA_API void lua_setflagbits (lua_State *L, int idx, unsigned short bits) { lua_unlock(L); } -LUA_API void lua_modflagbits (lua_State *L, int idx, unsigned short set, unsigned short clear) { +LUA_API void lua_modflagbits (lua_State *L, int idx, unsigned short clear, unsigned short set) { TValue *obj; Table *tab; lua_lock(L); obj = index2addr(L, idx); api_check(L, ttistable(obj), "table expected"); tab = hvalue(obj); - tab->flagbits |= set; tab->flagbits &= (~clear); + tab->flagbits |= set; lua_unlock(L); } diff --git a/luprex/eris-master/src/lua.h b/luprex/eris-master/src/lua.h index 1022c754..a78a5e1b 100644 --- a/luprex/eris-master/src/lua.h +++ b/luprex/eris-master/src/lua.h @@ -246,7 +246,7 @@ LUA_API void (lua_rawsetp) (lua_State *L, int idx, const void *p); LUA_API int (lua_setmetatable) (lua_State *L, int objindex); LUA_API void (lua_setuservalue) (lua_State *L, int idx); LUA_API void (lua_setflagbits) (lua_State *L, int idx, unsigned short bits); -LUA_API void (lua_modflagbits) (lua_State *L, int idx, unsigned short set, unsigned short clear); +LUA_API void (lua_modflagbits) (lua_State *L, int idx, unsigned short clear, unsigned short set); LUA_API unsigned short (lua_getflagbits) (lua_State *L, int idx); /*