Fix unable to load some unif carts

This commit is contained in:
negativeExponent
2020-03-24 01:50:10 +08:00
parent e1bf53e80c
commit 915c2be6a8

View File

@@ -273,10 +273,10 @@ static int TVCI(FCEUFILE *fp) {
} }
static int EnableBattery(FCEUFILE *fp) { static int EnableBattery(FCEUFILE *fp) {
FCEU_printf(" Battery-backed.\n"); int ret = FCEU_fgetc(fp);
if (FCEU_fgetc(fp) == EOF) UNIFCart.battery = (ret > 0) ? 1 : 0;
return(0); if (UNIFCart.battery)
UNIFCart.battery = 1; FCEU_printf(" Battery-backed.\n");
return(1); return(1);
} }