diff options
| author | Zach Hilman <zachhilman@gmail.com> | 2018-10-25 14:23:56 -0400 |
|---|---|---|
| committer | Zach Hilman <zachhilman@gmail.com> | 2018-10-25 14:23:56 -0400 |
| commit | 0bb4dbc74b273caede41f93d305f5f997faac465 (patch) | |
| tree | 33e583dae887a26a724b4661e470f74cf6c6fde5 | |
| parent | 47ca03016e9ae62bd535971c3905e84540f491d7 (diff) | |
ips_layer: Use rle_size instead of data_size in RLE patch application
Prevents a potential bug when using RLE records in an IPS patch.
| -rw-r--r-- | src/core/file_sys/ips_layer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/file_sys/ips_layer.cpp b/src/core/file_sys/ips_layer.cpp index 554eae9bca..999939d5ae 100644 --- a/src/core/file_sys/ips_layer.cpp +++ b/src/core/file_sys/ips_layer.cpp @@ -99,7 +99,7 @@ VirtualFile PatchIPS(const VirtualFile& in, const VirtualFile& ips) { u16 rle_size{}; if (ips->ReadObject(&rle_size, offset) != sizeof(u16)) return nullptr; - rle_size = Common::swap16(data_size); + rle_size = Common::swap16(rle_size); offset += sizeof(u16); const auto data = ips->ReadByte(offset++); |
