diff --git a/src/netbase.cpp b/src/netbase.cpp index b7e2e57917..259e5c14a3 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -983,7 +983,7 @@ std::vector CNetAddr::GetGroup() const nBits -= 8; } if (nBits > 0) - vchRet.push_back(GetByte(15 - nStartByte) | ((1 << nBits) - 1)); + vchRet.push_back(GetByte(15 - nStartByte) | ((1 << (8 - nBits)) - 1)); return vchRet; }