diff romdb.c @ 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 8ee7ecbf3f21
children 5d575c42fff5
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);
 		}