From d156c3275d35fbb77d7b3357e23c24f8901cd076 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Sat, 22 Feb 2020 18:12:46 +0300 Subject: [PATCH] [Memory] Fix incorrect comparison in QueryRangeAccess --- src/xenia/memory.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xenia/memory.cc b/src/xenia/memory.cc index f27b11ff1..f6f54a0fc 100644 --- a/src/xenia/memory.cc +++ b/src/xenia/memory.cc @@ -1299,7 +1299,7 @@ bool BaseHeap::QueryProtect(uint32_t address, uint32_t* out_protect) { xe::memory::PageAccess BaseHeap::QueryRangeAccess(uint32_t low_address, uint32_t high_address) { - if (low_address >= high_address || low_address < heap_base_ || + if (low_address > high_address || low_address < heap_base_ || (high_address - heap_base_) >= heap_size_) { return xe::memory::PageAccess::kNoAccess; }