Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-16 14:58:17 +00:00

nfqws2: lexra compile fix

This commit is contained in:
bol-van
2025-11-30 15:39:18 +03:00
parent 97e16b5611
commit b91fb6a424

View File

@@ -203,7 +203,8 @@ static int luacall_swap16(lua_State *L)
lua_Integer i = luaL_checkinteger(L,1);
if (i>0xFFFF || i<-(lua_Integer)0xFFFF) luaL_error(L, "out of range");
uint16_t u = (uint16_t)i;
lua_pushinteger(L,__builtin_bswap16(u));
// __builtin_bswap16 is absent in ancient lexra gcc 4.6
lua_pushinteger(L,(u>>8) | ((u&0xFF)<<8));
return 1;
}
static int luacall_swap32(lua_State *L)