Browse Source

hacks for more tests (don't worry I'll make sure not to have this as the final solution)

pull/2858/head
JPikachu 3 months ago
committed by crueter
parent
commit
babdcae063
  1. 9
      src/core/hle/kernel/svc/svc_process_memory.cpp

9
src/core/hle/kernel/svc/svc_process_memory.cpp

@ -35,10 +35,17 @@ Result SetProcessMemoryPermission(Core::System& system, Handle process_handle, u
"called, process_handle={:#X}, addr=0x{:X}, size=0x{:X}, permissions=0x{:08X}",
process_handle, address, size, perm);
// Workaround for Skyline 32-bit bug
if (size == 0) {
LOG_DEBUG(Kernel_SVC, "called. size=0, bypassing for now.");
R_RETURN(ResultSuccess);
}
// Validate the address/size.
R_UNLESS(Common::IsAligned(address, PageSize), ResultInvalidAddress);
R_UNLESS(Common::IsAligned(size, PageSize), ResultInvalidSize);
R_UNLESS(size > 0, ResultInvalidSize);
// Removed for the workaround, temp. (DO NOT MERGE)
// R_UNLESS(size > 0, ResultInvalidSize);
R_UNLESS((address < address + size), ResultInvalidCurrentMemory);
R_UNLESS(address == static_cast<uint64_t>(address), ResultInvalidCurrentMemory);
R_UNLESS(size == static_cast<uint64_t>(size), ResultInvalidCurrentMemory);

Loading…
Cancel
Save