aboutsummaryrefslogtreecommitdiff
path: root/src/protocol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol.cpp')
-rw-r--r--src/protocol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp
index f46570e21c..27efb8f293 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -223,7 +223,7 @@ bool CAddress::IsValid() const
if (memcmp(pchReserved, pchIPv4+3, sizeof(pchIPv4)-3) == 0)
return false;
- return (ip != 0 && ip != INADDR_NONE && port != htons(USHRT_MAX));
+ return (ip != 0 && ip != INADDR_NONE && port != htons(std::numeric_limits<unsigned short>::max()));
}
unsigned char CAddress::GetByte(int n) const