when comparing addresses, it helps if the /whole/ address is compared :P

This commit is contained in:
Bill Currie 2002-04-26 16:05:24 +00:00
parent 89f7604d40
commit a1c6547f16

View file

@ -171,8 +171,7 @@ NET_AdrIsLoopback (netadr_t a)
qboolean
NET_CompareBaseAdr (netadr_t a, netadr_t b)
{
if (a.ip[0] == b.ip[0] && a.ip[1] == b.ip[1] && a.ip[2] == b.ip[2]
&& a.ip[3] == b.ip[3])
if (memcmp (a.ip, b.ip, sizeof (a.ip)) == 0)
return true;
return false;
}
@ -180,8 +179,7 @@ NET_CompareBaseAdr (netadr_t a, netadr_t b)
qboolean
NET_CompareAdr (netadr_t a, netadr_t b)
{
if (a.ip[0] == b.ip[0] && a.ip[1] == b.ip[1] && a.ip[2] == b.ip[2]
&& a.ip[3] == b.ip[3] && a.port == b.port)
if (memcmp (a.ip, b.ip, sizeof (a.ip)) == 0 && a.port == b.port)
return true;
return false;
}