From 83136697168dfabf1f36725fbbf5e08c46b9231e Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Tue, 23 Apr 2019 08:31:11 -0700 Subject: [PATCH] Fix NRO patch offset application --- stratosphere/ro/source/ro_patcher.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/stratosphere/ro/source/ro_patcher.cpp b/stratosphere/ro/source/ro_patcher.cpp index 355a7d2ce..0ac52c98c 100644 --- a/stratosphere/ro/source/ro_patcher.cpp +++ b/stratosphere/ro/source/ro_patcher.cpp @@ -107,7 +107,6 @@ static void ApplyIpsPatch(u8 *mapped_nro, size_t mapped_size, bool is_ips32, FIL } } else { IPS_RLE_PATCH_OFFSET_WITHIN_BOUNDS: - patch_offset -= sizeof(Registration::NroHeader); if (patch_offset + rle_size > mapped_size) { rle_size = mapped_size - patch_offset; } @@ -126,7 +125,6 @@ static void ApplyIpsPatch(u8 *mapped_nro, size_t mapped_size, bool is_ips32, FIL } } else { IPS_DATA_PATCH_OFFSET_WITHIN_BOUNDS: - patch_offset -= sizeof(Registration::NroHeader); u32 read_size = patch_size; if (patch_offset + read_size > mapped_size) { read_size = mapped_size - patch_offset;