Fix masking of irrelevant bits in address groups.

pull/220/head
Alex Morcos 9 years ago committed by Luke Dashjr
parent 65426acb4d
commit bdf2542787

@ -944,7 +944,7 @@ std::vector<unsigned char> CNetAddr::GetGroup() const
nBits -= 8; nBits -= 8;
} }
if (nBits > 0) if (nBits > 0)
vchRet.push_back(GetByte(15 - nStartByte) | ((1 << nBits) - 1)); vchRet.push_back(GetByte(15 - nStartByte) | ((1 << (8 - nBits)) - 1));
return vchRet; return vchRet;
} }

Loading…
Cancel
Save