Merge pull request #1583 from DarkLordZach/rle-size

ips_layer: Use rle_size instead of data_size in RLE patch application
This commit is contained in:
Mat M 2018-10-25 17:54:38 -04:00 committed by GitHub
commit a141b46b5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,7 +99,7 @@ VirtualFile PatchIPS(const VirtualFile& in, const VirtualFile& ips) {
u16 rle_size{}; u16 rle_size{};
if (ips->ReadObject(&rle_size, offset) != sizeof(u16)) if (ips->ReadObject(&rle_size, offset) != sizeof(u16))
return nullptr; return nullptr;
rle_size = Common::swap16(data_size); rle_size = Common::swap16(rle_size);
offset += sizeof(u16); offset += sizeof(u16);
const auto data = ips->ReadByte(offset++); const auto data = ips->ReadByte(offset++);