Fix BPS patch support. (ArtiiP)

This commit is contained in:
Brandon Wright 2019-04-10 14:12:29 -05:00
parent 07f1976dcf
commit c6facbdf4a

View File

@ -3860,6 +3860,7 @@ static bool8 ReadBPSPatch (Stream *r, long, int32 &rom_size)
if(patch_crc32 != pp_crc32) { delete[] data; return false; } //patch is corrupted if(patch_crc32 != pp_crc32) { delete[] data; return false; } //patch is corrupted
if(!Settings.IgnorePatchChecksum && rom_crc32 != source_crc32) { delete[] data; return false; } //patch is for a different ROM if(!Settings.IgnorePatchChecksum && rom_crc32 != source_crc32) { delete[] data; return false; } //patch is for a different ROM
XPSdecode(data, addr, size);
uint32 target_size = XPSdecode(data, addr, size); uint32 target_size = XPSdecode(data, addr, size);
uint32 metadata_size = XPSdecode(data, addr, size); uint32 metadata_size = XPSdecode(data, addr, size);
addr += metadata_size; addr += metadata_size;