fixed CIDR calculation

This commit is contained in:
Arvid Norberg 2009-03-25 23:58:39 +00:00
parent 37cbdb331e
commit 3d2bf88894
2 changed files with 2 additions and 1 deletions

View File

@ -51,6 +51,7 @@ release 0.14.3
* fixed issue where renamed files were sometimes not saved in resume data
* accepts tracker responses with no 'peers' field, as long as 'peers6'
is present
* fixed CIDR-distance calculation in the precense of IPv6 peers
release 0.14.2

View File

@ -128,7 +128,7 @@ namespace libtorrent
// between the addresses.
int cidr_distance(address const& a1, address const& a2)
{
if (a1.is_v4() == a2.is_v4())
if (a1.is_v4() && a2.is_v4())
{
// both are v4
address_v4::bytes_type b1 = a1.to_v4().to_bytes();