From db5816edd63bf80b41d68ee985864096c90fcde1 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Thu, 4 Aug 2022 02:34:51 +0200 Subject: [PATCH] Fix to temp allocator reset. --- lib/std/core/allocators/temp_allocator.c3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/core/allocators/temp_allocator.c3 b/lib/std/core/allocators/temp_allocator.c3 index e60253fcf..1349c4de8 100644 --- a/lib/std/core/allocators/temp_allocator.c3 +++ b/lib/std/core/allocators/temp_allocator.c3 @@ -101,7 +101,7 @@ private fn void! TempAllocator._free(TempAllocator* this, void* old_pointer) private fn void! TempAllocator._reset(TempAllocator* this, usize mark) { TempAllocatorPage *last_page = this.last_page; - while (last_page && last_page.mark < mark) + while (last_page && last_page.mark >= mark) { TempAllocatorPage *to_free = last_page; last_page = last_page.prev_page;