Fix XeUnloadSection errorerously zeroing memory

Makes Apex/Racing Evoluzione reach menus
This commit is contained in:
Silent 2021-03-05 22:21:48 +01:00
parent 84cd4e3ba4
commit 6d1e095a41
No known key found for this signature in database
GPG Key ID: AE53149BB0C45AF1
1 changed files with 1 additions and 2 deletions

View File

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