diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/ldr/ldr.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp index 061358863..28d8114c5 100644 --- a/src/core/hle/service/ldr/ldr.cpp +++ b/src/core/hle/service/ldr/ldr.cpp @@ -530,9 +530,13 @@ public: ResultCode UnmapNro(const NROInfo& info) { // Each region must be unmapped separately to validate memory state auto& page_table{system.CurrentProcess()->PageTable()}; - CASCADE_CODE(page_table.UnmapCodeMemory(info.nro_address + info.text_size + info.ro_size + - info.data_size, - info.bss_address, info.bss_size)); + + if (info.bss_size != 0) { + CASCADE_CODE(page_table.UnmapCodeMemory(info.nro_address + info.text_size + + info.ro_size + info.data_size, + info.bss_address, info.bss_size)); + } + CASCADE_CODE(page_table.UnmapCodeMemory(info.nro_address + info.text_size + info.ro_size, info.src_addr + info.text_size + info.ro_size, info.data_size)); |