mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Merge pull request #6556
1123cdbadd unit test for CNetAddr::GetGroup. (Alex Morcos)bba3db1Fix masking of irrelevant bits in address groups. (Alex Morcos)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user