From f6b640961f613f6579b8faf067a81963fb555447 Mon Sep 17 00:00:00 2001 From: Belal Ashraf Date: Thu, 4 Apr 2024 23:43:18 +0200 Subject: [PATCH] Fix bug in ConvertToKMemoryPermission --- src/core/hle/kernel/k_memory_block.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hle/kernel/k_memory_block.h b/src/core/hle/kernel/k_memory_block.h index d2b7e9a66e..70e1dfa3fb 100644 --- a/src/core/hle/kernel/k_memory_block.h +++ b/src/core/hle/kernel/k_memory_block.h @@ -176,7 +176,7 @@ constexpr KMemoryPermission ConvertToKMemoryPermission(Svc::MemoryPermission per (static_cast(perm) & KMemoryPermission::UserMask) | KMemoryPermission::KernelRead | ((static_cast(perm) & KMemoryPermission::UserWrite) - << KMemoryPermission::KernelShift) | + ? KMemoryPermission::KernelWrite : KMemoryPermission::None) | (perm == Svc::MemoryPermission::None ? KMemoryPermission::NotMapped : KMemoryPermission::None)); }