diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-08-20 16:45:20 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-08-20 16:45:46 +0200 |
commit | 70ec975ea624ab759ee576e6b7a3458d388051fb (patch) | |
tree | ed1e8ebc824872cd3bc6f690c3e773e83ca8e460 /src/netbase.cpp | |
parent | 5e6e0898a1115c6badd3f4ddf2f42e571471b54f (diff) | |
parent | 1123cdbf4d9f4fbc131da48ed4e798be93f3c967 (diff) |
Merge pull request #6556
1123cdb add unit test for CNetAddr::GetGroup. (Alex Morcos)
bba3db1 Fix masking of irrelevant bits in address groups. (Alex Morcos)
Diffstat (limited to 'src/netbase.cpp')
-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 dec00e1eeb..7a87d125c2 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; } |