From 6d1e095a4197f8e242804d67c5c85b375505dd5e Mon Sep 17 00:00:00 2001 From: Silent Date: Fri, 5 Mar 2021 22:21:48 +0100 Subject: [PATCH] Fix XeUnloadSection errorerously zeroing memory Makes Apex/Racing Evoluzione reach menus --- src/core/kernel/exports/EmuKrnlXe.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/kernel/exports/EmuKrnlXe.cpp b/src/core/kernel/exports/EmuKrnlXe.cpp index ef30a3ee3..6a8c28f89 100644 --- a/src/core/kernel/exports/EmuKrnlXe.cpp +++ b/src/core/kernel/exports/EmuKrnlXe.cpp @@ -126,9 +126,8 @@ XBSYSAPI EXPORTNUM(328) xbox::ntstatus_xt NTAPI xbox::XeUnloadSection // Free the section and the physical memory in use if necessary if (Section->SectionReferenceCount == 0) { - memset(Section->VirtualAddress, 0, Section->VirtualSize); - // REMARK: the following can be tested with Broken Sword - The Sleeping Dragon, RalliSport Challenge, ... + // Test-case: Apex/Racing Evoluzione requires the memory NOT to be zeroed VAddr BaseAddress = (VAddr)Section->VirtualAddress; VAddr EndingAddress = (VAddr)Section->VirtualAddress + Section->VirtualSize;