From 3b45003468efd6490b3c8303b66418748313a575 Mon Sep 17 00:00:00 2001 From: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com> Date: Thu, 25 Jul 2024 02:52:47 +0300 Subject: [PATCH] memory: Contains check is inclusive --- src/core/memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/memory.h b/src/core/memory.h index 1fd6e417..ff4af5cd 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -89,7 +89,7 @@ struct VirtualMemoryArea { uintptr_t fd = 0; bool Contains(VAddr addr, size_t size) const { - return addr >= base && (addr + size) < (base + this->size); + return addr >= base && (addr + size) <= (base + this->size); } bool IsFree() const noexcept {