Commit a1ed5008 authored by Michał Janiszewski's avatar Michał Janiszewski Committed by Alexandre Julliard

ntdll: Only set owned bits in RTL_BITMAP.

parent 355f6b24
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment