aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r--src/netbase.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 3a3b5f3e66..0273839017 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -13,6 +13,7 @@
#include <atomic>
#include <cstdint>
+#include <limits>
#ifndef WIN32
#include <fcntl.h>
@@ -838,8 +839,8 @@ bool LookupSubNet(const std::string& strSubnet, CSubNet& ret)
if (slash != strSubnet.npos)
{
std::string strNetmask = strSubnet.substr(slash + 1);
- int32_t n;
- if (ParseInt32(strNetmask, &n)) {
+ uint8_t n;
+ if (ParseUInt8(strNetmask, &n)) {
// If valid number, assume CIDR variable-length subnet masking
ret = CSubNet(network, n);
return ret.IsValid();