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:
parent
355f6b24d2
commit
a1ed500836
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue