Skip to content

Commit

Permalink
fix #1139
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwu committed Dec 25, 2019
1 parent c075de7 commit d232af7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lualib-src/lua-multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d232af7

Please sign in to comment.