diff options
author | Alex Morcos <morcos@chaincode.com> | 2015-08-14 14:23:37 -0500 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2015-09-21 05:21:31 +0000 |
commit | bdf2542787314bce0c5cc39f03df0a0b27eb31cb (patch) | |
tree | 5ba652daa11f0afcd78e73e1e495433235314ac6 | |
parent | 65426acb4dfdbcda03337cb68e8fa8854bc76e17 (diff) |
Fix masking of irrelevant bits in address groups.
-rw-r--r-- | src/netbase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp index 053c645a1b..6465ca61a2 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -944,7 +944,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; } |