mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
when comparing addresses, it helps if the /whole/ address is compared :P
This commit is contained in:
parent
89f7604d40
commit
a1c6547f16
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue