mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-22 02:45:07 -04:00
loader: fix ldr:ro unmap semantics for < 3.0.0
This commit is contained in:
parent
e7f941fa3d
commit
db3c5cf20f
2 changed files with 62 additions and 45 deletions
|
@ -151,13 +151,15 @@ struct MappedCodeMemory {
|
|||
return rc;
|
||||
}
|
||||
|
||||
void Unmap() {
|
||||
Result Unmap() {
|
||||
Result rc = 0;
|
||||
if (this->IsMapped()) {
|
||||
if (R_FAILED(svcUnmapProcessMemory(this->mapped_address, this->process_handle, this->code_memory_address, this->size))) {
|
||||
if (R_FAILED((rc = svcUnmapProcessMemory(this->mapped_address, this->process_handle, this->code_memory_address, this->size)))) {
|
||||
/* TODO: panic(). */
|
||||
}
|
||||
}
|
||||
this->mapped_address = NULL;
|
||||
return rc;
|
||||
}
|
||||
|
||||
void Close() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue