mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 11:33:09 +00:00
fix #1139
This commit is contained in:
@@ -141,7 +141,8 @@ static int
|
||||
mc_nextid(lua_State *L) {
|
||||
uint32_t id = (uint32_t)luaL_checkinteger(L, 1);
|
||||
id += 256;
|
||||
lua_pushinteger(L, (uint32_t)id);
|
||||
// remove the highest bit, see #1139
|
||||
lua_pushinteger(L, id & 0x7fffffffu);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user