# HG changeset patch # User Michael Pavone # Date 1644302831 28800 # Node ID 0407d812cb4ae1941a3070380d6da1342c48e3de # Parent 460c93c19146a39c80235b1769b46e126c69632f Fix off-by-one in sega mapper heuristic diff -r 460c93c19146 -r 0407d812cb4a romdb.c --- a/romdb.c Mon Feb 07 21:54:57 2022 -0800 +++ b/romdb.c Mon Feb 07 22:47:11 2022 -0800 @@ -265,7 +265,7 @@ } info->save_type = SAVE_NONE; uint8_t is_med_ssf = size >= 0x108 && !memcmp("SEGA SSF", rom + 0x100, 8); - if (is_med_ssf || (size >= 0x400000 && rom_end_raw <= 0x400000)) { + if (is_med_ssf || (size > 0x400000 && rom_end_raw <= 0x400000)) { if (is_med_ssf && rom_end < 16*1024*1024) { info->rom = rom = realloc(rom, 16*1024*1024); }