mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 05:53:05 +00:00
[IP] AddrCountPrefixBits(): Fix loop condition (#4556)
Properly handle BitTest reaching 0. CORE-18225
This commit is contained in:
parent
d4a398fb13
commit
ef1311b7a4
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ UINT AddrCountPrefixBits( PIP_ADDRESS Netmask ) {
|
||||||
|
|
||||||
ULONG TestMask = IPv4NToHl(Netmask->Address.IPv4Address);
|
ULONG TestMask = IPv4NToHl(Netmask->Address.IPv4Address);
|
||||||
|
|
||||||
while( (BitTest & TestMask) == BitTest ) {
|
while ((BitTest & TestMask) != 0) {
|
||||||
Prefix++;
|
Prefix++;
|
||||||
BitTest >>= 1;
|
BitTest >>= 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue