From e7dfbd5542ab0f51c21720916d8b71311da1cd87 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Tue, 10 Feb 2015 23:00:49 -0800 Subject: [PATCH] Make XexGetModuleHandle set ptr to 0 on failure. --- src/xenia/kernel/xboxkrnl_modules.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xenia/kernel/xboxkrnl_modules.cc b/src/xenia/kernel/xboxkrnl_modules.cc index aff15fa4b..9b3275bb4 100644 --- a/src/xenia/kernel/xboxkrnl_modules.cc +++ b/src/xenia/kernel/xboxkrnl_modules.cc @@ -163,6 +163,7 @@ SHIM_CALL XexGetModuleHandle_shim(PPCContext* ppc_state, KernelState* state) { module = state->GetModule(module_name); } if (!module) { + SHIM_SET_MEM_32(module_handle_ptr, 0); SHIM_SET_RETURN_32(X_ERROR_NOT_FOUND); return; }