mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +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
|
qboolean
|
||||||
NET_CompareBaseAdr (netadr_t a, netadr_t b)
|
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]
|
if (memcmp (a.ip, b.ip, sizeof (a.ip)) == 0)
|
||||||
&& a.ip[3] == b.ip[3])
|
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -180,8 +179,7 @@ NET_CompareBaseAdr (netadr_t a, netadr_t b)
|
||||||
qboolean
|
qboolean
|
||||||
NET_CompareAdr (netadr_t a, netadr_t b)
|
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]
|
if (memcmp (a.ip, b.ip, sizeof (a.ip)) == 0 && a.port == b.port)
|
||||||
&& a.ip[3] == b.ip[3] && a.port == b.port)
|
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue