Update VM/src/lbitlib.cpp

This commit is contained in:
Arseny Kapoulkine 2023-10-20 18:13:18 -07:00 committed by GitHub
parent c255dbc3c3
commit f840c52f3d
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -218,7 +218,7 @@ static int b_swap(lua_State* L)
luaL_error(L, "bit32.byteswap isn't enabled");
b_uint n = luaL_checkunsigned(L, 1);
n = (n << 24) | ((n << 8) & 0xff0000) | (n >> 8 & 0xff00) | n >> 24;
n = (n << 24) | ((n << 8) & 0xff0000) | ((n >> 8) & 0xff00) | (n >> 24);
lua_pushunsigned(L, n);
return 1;