mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02: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:
commit
70ec975ea6
2 changed files with 18 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue