summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/network/core/address.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/core/address.cpp b/src/network/core/address.cpp
index 91a481795..044df0050 100644
--- a/src/network/core/address.cpp
+++ b/src/network/core/address.cpp
@@ -170,7 +170,7 @@ bool NetworkAddress::IsInNetmask(const char *netmask)
int tmp_cidr = atoi(chr_cidr + 1);
/* Invalid CIDR, treat as single host */
- if (tmp_cidr > 0 || tmp_cidr < cidr) cidr = tmp_cidr;
+ if (tmp_cidr > 0 && tmp_cidr < cidr) cidr = tmp_cidr;
/* Remove the / so that NetworkAddress works on the IP portion */
std::string ip_str(netmask, chr_cidr - netmask);