diff options
author | rubidium <rubidium@openttd.org> | 2010-03-11 17:57:14 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-03-11 17:57:14 +0000 |
commit | 6b35de215cac57c773cf32c7bc0c6adaf59d3df1 (patch) | |
tree | f6c72a12ab40dbc3340e9eaf420d6a6864159a3d /src | |
parent | f7eb527a372e69332970a5fe9d3229c185aeddea (diff) | |
download | openttd-6b35de215cac57c773cf32c7bc0c6adaf59d3df1.tar.xz |
(svn r19385) -Fix [FS#3684]: [IPv6] Netmask calculations were wrong if cidr >= 32.
Diffstat (limited to 'src')
-rw-r--r-- | src/network/core/address.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/core/address.cpp b/src/network/core/address.cpp index 4e1237577..586ee863a 100644 --- a/src/network/core/address.cpp +++ b/src/network/core/address.cpp @@ -161,7 +161,7 @@ bool NetworkAddress::IsInNetmask(char *netmask) while (cidr > 0) { uint32 msk = cidr >= 32 ? (uint32)-1 : htonl(-(1 << (32 - cidr))); - if ((*mask & msk) != (*ip & msk)) return false; + if ((*mask++ & msk) != (*ip++ & msk)) return false; cidr -= 32; } |