From bba3db1a40c2125c23a657e5f2d89e334037f792 Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Fri, 14 Aug 2015 14:23:37 -0500 Subject: [PATCH] Fix masking of irrelevant bits in address groups. --- src/netbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/netbase.cpp b/src/netbase.cpp index b7e2e57917b..259e5c14a3e 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -983,7 +983,7 @@ std::vector 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; }