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..
This commit is contained in:
Mary 2021-10-25 01:00:31 +02:00 committed by GitHub
parent 04dfb86fde
commit 5c66a36ed6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}