From 5c66a36ed65f76e27c86e6481fda59f313463da3 Mon Sep 17 00:00:00 2001 From: Mary Date: Mon, 25 Oct 2021 01:00:31 +0200 Subject: [PATCH] kernel: Fix inverted condition on permission check of SetMemoryPermission syscall (#2777) * kernel: Fix inverted condition on permission check of SetMemoryPermission syscall * Fix condition for real.. --- Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs index a1e84935ae..f7b3215f92 100644 --- a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs +++ b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs @@ -836,7 +836,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall return KernelResult.InvalidMemState; } - if (permission == KMemoryPermission.None || (permission | KMemoryPermission.Write) != KMemoryPermission.ReadAndWrite) + if (permission != KMemoryPermission.None && (permission | KMemoryPermission.Write) != KMemoryPermission.ReadAndWrite) { return KernelResult.InvalidPermission; }