Skip to content

Commit

Permalink
Fix bits in ipv6 address groups
Browse files Browse the repository at this point in the history
  • Loading branch information
sats0k committed Dec 29, 2021
1 parent 69d6d78 commit 5338a2c
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 @@ -912,7 +912,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 5338a2c

Please sign in to comment.