Fixed the second batch of problems

This commit is contained in:
OBattler
2020-01-15 03:48:33 +01:00
parent fab0a368f1
commit af023ff5dd
14 changed files with 123 additions and 64 deletions

View File

@@ -1333,7 +1333,8 @@ loadrom(hdc_t *dev, const wchar_t *fn)
/* Load the ROM data. */
dev->bios_rom.rom = (uint8_t *)malloc(size);
memset(dev->bios_rom.rom, 0xff, size);
(void)fread(dev->bios_rom.rom, size, 1, fp);
if (fread(dev->bios_rom.rom, 1, size, fp) != size)
fatal("ST-506 XT loadrom(): Error reading data\n");
(void)fclose(fp);
/* Set up an address mask for this memory. */