Bitmap: Fix crash by attempting to memset -1 bits (UINT64_MAX)
This commit is contained in:
parent
d3458f2f0f
commit
f65ed465c4
@ -65,10 +65,11 @@ void Bitmap::clear_region(usize start, usize bits, bool value)
|
||||
if (!bits) return;
|
||||
|
||||
// Set individual bits while not on a byte boundary.
|
||||
while ((start % 8) && bits--)
|
||||
while ((start % 8) && bits)
|
||||
{
|
||||
set(start, value);
|
||||
start++;
|
||||
bits--;
|
||||
}
|
||||
|
||||
// Clear out the rest in bytes.
|
||||
|
Loading…
Reference in New Issue
Block a user