diff --git a/src/i_tcp.c b/src/i_tcp.c index 89e59c8b..eca218c8 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -466,7 +466,7 @@ static boolean SOCK_cmpaddr(mysockaddr_t *a, mysockaddr_t *b, UINT8 mask) UINT32 bitmask = INADDR_NONE; if (mask && mask < 32) - bitmask = htonl(-1 << (32 - mask)); + bitmask = htonl((UINT32)(-1) << (32 - mask)); if (b->any.sa_family == AF_INET) return (a->ip4.sin_addr.s_addr & bitmask) == (b->ip4.sin_addr.s_addr & bitmask)