diff --git a/luna/src/Bitmap.cpp b/luna/src/Bitmap.cpp index 1928208e..a29fc947 100644 --- a/luna/src/Bitmap.cpp +++ b/luna/src/Bitmap.cpp @@ -62,6 +62,8 @@ void Bitmap::clear_region(usize start, usize bits, bool value) expect(initialized(), "Bitmap was never initialized"); expect((start + bits) <= size(), "Bitmap clear out of range"); + if (!bits) return; + // Set individual bits while not on a byte boundary. while ((start % 8) && bits--) {