Skip to content

Commit

Permalink
Fix masking of irrelevant bits in address groups.
Browse files Browse the repository at this point in the history
  • Loading branch information
morcos authored and Fuzzbawls committed May 21, 2020
1 parent 1824def commit f0e0aca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/netbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,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;
}
Expand Down

0 comments on commit f0e0aca

Please sign in to comment.