mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-22 20:06:40 +00:00
loader: fix ldr:ro mapping error on < 3.0.0
This commit is contained in:
parent
3fcad4bc65
commit
60776e8111
1 changed files with 7 additions and 7 deletions
|
@ -131,7 +131,7 @@ Result MapUtils::MapCodeMemoryForProcessModern(Handle process_h, u64 base_addres
|
||||||
AddressSpaceInfo address_space = {0};
|
AddressSpaceInfo address_space = {0};
|
||||||
Result rc;
|
Result rc;
|
||||||
|
|
||||||
if (R_FAILED((rc = GetAddressSpaceInfo(&address_space, CUR_PROCESS_HANDLE)))) {
|
if (R_FAILED((rc = GetAddressSpaceInfo(&address_space, process_h)))) {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,22 +193,22 @@ Result MapUtils::MapCodeMemoryForProcessDeprecated(Handle process_h, bool is_64_
|
||||||
|
|
||||||
Result MapUtils::GetAddressSpaceInfo(AddressSpaceInfo *out, Handle process_h) {
|
Result MapUtils::GetAddressSpaceInfo(AddressSpaceInfo *out, Handle process_h) {
|
||||||
Result rc;
|
Result rc;
|
||||||
if (R_FAILED((rc = svcGetInfo(&out->heap_base, 4, CUR_PROCESS_HANDLE, 0)))) {
|
if (R_FAILED((rc = svcGetInfo(&out->heap_base, 4, process_h, 0)))) {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
if (R_FAILED((rc = svcGetInfo(&out->heap_size, 5, CUR_PROCESS_HANDLE, 0)))) {
|
if (R_FAILED((rc = svcGetInfo(&out->heap_size, 5, process_h, 0)))) {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
if (R_FAILED((rc = svcGetInfo(&out->map_base, 2, CUR_PROCESS_HANDLE, 0)))) {
|
if (R_FAILED((rc = svcGetInfo(&out->map_base, 2, process_h, 0)))) {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
if (R_FAILED((rc = svcGetInfo(&out->map_size, 3, CUR_PROCESS_HANDLE, 0)))) {
|
if (R_FAILED((rc = svcGetInfo(&out->map_size, 3, process_h, 0)))) {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
if (R_FAILED((rc = svcGetInfo(&out->addspace_base, 12, CUR_PROCESS_HANDLE, 0)))) {
|
if (R_FAILED((rc = svcGetInfo(&out->addspace_base, 12, process_h, 0)))) {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
if (R_FAILED((rc = svcGetInfo(&out->addspace_size, 13, CUR_PROCESS_HANDLE, 0)))) {
|
if (R_FAILED((rc = svcGetInfo(&out->addspace_size, 13, process_h, 0)))) {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
out->heap_end = out->heap_base + out->heap_size;
|
out->heap_end = out->heap_base + out->heap_size;
|
||||||
|
|
Loading…
Reference in a new issue