From 4c2ab2e63672474714eaf76f75e47030d093a592 Mon Sep 17 00:00:00 2001 From: "fabio.olimpieri" Date: Fri, 16 May 2014 13:55:21 +0000 Subject: [PATCH] Emulator does not exit if the cartridge is not 16KB long --- src/emulator.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/emulator.c b/src/emulator.c index aeb0893..ae2be2a 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -398,9 +398,12 @@ void load_rom(char type) { switch(type) { case 0: + if (rom_cartridge[0]) + {if (load_rom_cartridge()) {msgInfo("Cartridge must be 16KB long", 3000, NULL);} else break;} + if (ordenador.se_basic) filenames[0]="spectrum-roms/opense.rom"; else filenames[0]="spectrum-roms/48.rom"; filenames[1]=NULL; - if (rom_cartridge[0]) retval = load_rom_cartridge(); else retval=load_a_rom(filenames); + retval=load_a_rom(filenames); if (retval) { printf("Can't load file %s\n",retval); exit(1);