Allow UPS patch for GBA games.

From my very superficial understanding, the `rom[]` resize happens
only when `rom_size` is greater than 0x2000000.

We should probably study this better for an actual explanation.

- Fix #487.
This commit is contained in:
Edênis Freindorfer Azevedo 2019-08-20 20:58:18 -03:00 committed by Rafael Kitover
parent 1949cdb37a
commit 06a9d786c2
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ void GameArea::LoadGame(const wxString& name)
if (loadpatch) {
// don't use real rom size or it might try to resize rom[]
// instead, use known size of rom[]
int size = 0x2000000;
int size = 0x2000000 < rom_size ? 0x2000000 : rom_size;
applyPatch(pfn.GetFullPath().mb_str(), &rom, &size);
// that means we no longer really know rom_size either <sigh>
}