From 4ccf30dfaafaeed6f2520066bcfdf898023fd812 Mon Sep 17 00:00:00 2001
From: Lioncash <mathew1800@gmail.com>
Date: Fri, 12 Oct 2018 01:43:15 -0400
Subject: [PATCH] svc: Fix typos in sanitizing checks for MapMemory/UnmapMemory

---
 src/core/hle/kernel/svc.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 3e4dd61dc6..0b12d5ae96 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -95,12 +95,12 @@ ResultCode MapUnmapMemorySanityChecks(const VMManager& vm_manager, VAddr dst_add
 
     const VAddr dst_end_address = dst_addr + size;
     if (dst_end_address > vm_manager.GetHeapRegionBaseAddress() &&
-        dst_addr < vm_manager.GetHeapRegionEndAddress()) {
+        vm_manager.GetHeapRegionEndAddress() > dst_addr) {
         return ERR_INVALID_MEMORY_RANGE;
     }
 
-    if (dst_end_address > vm_manager.GetNewMapRegionBaseAddress() &&
-        dst_addr < vm_manager.GetMapRegionEndAddress()) {
+    if (dst_end_address > vm_manager.GetMapRegionBaseAddress() &&
+        vm_manager.GetMapRegionEndAddress() > dst_addr) {
         return ERR_INVALID_MEMORY_RANGE;
     }
 
-- 
GitLab