mirror of
https://github.com/reactos/reactos.git
synced 2026-06-03 17:59:48 +08:00
[IP] AddrCountPrefixBits(): Fix loop condition (#4556)
Properly handle BitTest reaching 0. CORE-18225
This commit is contained in:
@@ -71,7 +71,7 @@ UINT AddrCountPrefixBits( PIP_ADDRESS Netmask ) {
|
||||
|
||||
ULONG TestMask = IPv4NToHl(Netmask->Address.IPv4Address);
|
||||
|
||||
while( (BitTest & TestMask) == BitTest ) {
|
||||
while ((BitTest & TestMask) != 0) {
|
||||
Prefix++;
|
||||
BitTest >>= 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user