From 16bc654bec4a505aee70e0b7f9ecd6f512c3e426 Mon Sep 17 00:00:00 2001 From: Amelia Coutard Date: Sun, 8 May 2022 20:38:53 +0200 Subject: [PATCH] Maybe fixed a bug. Avoided a potential one, anyways --- src/kernel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel.cpp b/src/kernel.cpp index ef4d26f..4c766cd 100644 --- a/src/kernel.cpp +++ b/src/kernel.cpp @@ -89,7 +89,7 @@ extern "C" void kmain(unsigned long magic, os::phys_ptr e{multiboot2::memory_map_base_addr(it, i) + multiboot2::memory_map_length(it, i) / 0x1000 * 0x1000}; if (s == nullptr) { } - if (s != e) { + if (s < e) { remove_some_mem( s, e, kernel_start, kernel_end, [&page_allocator, info_start, info_end] (auto s, auto e) { -- 2.47.0