Mercurial > repos > blastem
changeset 2097:0407d812cb4a
Fix off-by-one in sega mapper heuristic
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 07 Feb 2022 22:47:11 -0800 |
parents | 460c93c19146 |
children | da326c32ad8f |
files | romdb.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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); }