From d420215de1a738c876d49c9b951c7a45ed5884cf Mon Sep 17 00:00:00 2001 From: gibbed Date: Fri, 4 Dec 2020 15:06:26 -0600 Subject: [PATCH] [Kernel] Allow 0 return for MmQueryAddressProtect. --- src/xenia/kernel/xboxkrnl/xboxkrnl_memory.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_memory.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_memory.cc index 8ecdabd5d..bcb88123c 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_memory.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_memory.cc @@ -400,7 +400,7 @@ dword_result_t MmQueryAddressProtect(dword_t base_address) { if (!heap->QueryProtect(base_address, &access)) { access = 0; } - access = ToXdkProtectFlags(access); + access = !access ? 0 : ToXdkProtectFlags(access); return access; }