aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Morcos <morcos@chaincode.com>2015-08-14 14:23:37 -0500
committerAlex Morcos <morcos@chaincode.com>2015-08-14 14:25:19 -0500
commitbba3db1a40c2125c23a657e5f2d89e334037f792 (patch)
tree66198f1e90ba2eeae6b34a19b94382f405a77ad7 /src
parentddd8d80c63182aefea56abf743bb9199d9602544 (diff)
Fix masking of irrelevant bits in address groups.
Diffstat (limited to 'src')
-rw-r--r--src/netbase.cpp2
1 files changed, 1 insertions, 1 deletions
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<unsigned char> 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;
}