ntdll: Only set owned bits in RTL_BITMAP.

Signed-off-by: Michał Janiszewski <janisozaur@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michał Janiszewski 2018-07-01 23:51:22 +02:00 committed by Alexandre Julliard
parent 355f6b24d2
commit a1ed500836
1 changed files with 4 additions and 4 deletions

View File

@ -156,8 +156,8 @@ VOID WINAPI RtlSetBits(PRTL_BITMAP lpBits, ULONG ulStart, ULONG ulCount)
/* Set from the start bit, possibly into the next byte also */
USHORT initialWord = NTDLL_maskBits[ulCount] << (ulStart & 7);
*lpOut++ |= (initialWord & 0xff);
*lpOut |= (initialWord >> 8);
*lpOut |= (initialWord & 0xff);
if (initialWord >> 8) lpOut[1] |= (initialWord >> 8);
return;
}
}
@ -217,8 +217,8 @@ VOID WINAPI RtlClearBits(PRTL_BITMAP lpBits, ULONG ulStart, ULONG ulCount)
/* Clear from the start bit, possibly into the next byte also */
USHORT initialWord = ~(NTDLL_maskBits[ulCount] << (ulStart & 7));
*lpOut++ &= (initialWord & 0xff);
*lpOut &= (initialWord >> 8);
*lpOut &= (initialWord & 0xff);
if ((initialWord >> 8) != 0xff) lpOut[1] &= (initialWord >> 8);
return;
}
}