diff options
| author | oy <Tom_Adams@web.de> | 2012-04-20 22:20:11 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2013-02-24 17:34:22 +0100 |
| commit | 14cd83de10e5725db6f159a9cfe8d0c8d7bd9b59 (patch) | |
| tree | f239c71417abeb81983f5b06cbd4bab1dd1547b5 /src | |
| parent | 86708818e9012a59cb00f6d836000a5c72850195 (diff) | |
| download | zcatch-14cd83de10e5725db6f159a9cfe8d0c8d7bd9b59.tar.gz zcatch-14cd83de10e5725db6f159a9cfe8d0c8d7bd9b59.zip | |
fixed ban range check to make sure the whole ip matches and not just rely on the hash. Closes #946
Diffstat (limited to 'src')
| -rw-r--r-- | src/engine/shared/netban.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/engine/shared/netban.h b/src/engine/shared/netban.h index 447a838d..6d690164 100644 --- a/src/engine/shared/netban.h +++ b/src/engine/shared/netban.h @@ -34,7 +34,7 @@ protected: bool NetMatch(const CNetRange *pRange, const NETADDR *pAddr, int Start, int Length) const { - return pRange->m_LB.type == pAddr->type && + return pRange->m_LB.type == pAddr->type && (Start == 0 || mem_comp(&pRange->m_LB.ip[0], &pAddr->ip[0], Start) == 0) && mem_comp(&pRange->m_LB.ip[Start], &pAddr->ip[Start], Length-Start) <= 0 && mem_comp(&pRange->m_UB.ip[Start], &pAddr->ip[Start], Length-Start) >= 0; } |