Fixed the fourth batch of problems.

This commit is contained in:
OBattler
2020-01-15 05:24:33 +01:00
parent 932ad5595a
commit e44e60c660
19 changed files with 91 additions and 50 deletions

View File

@@ -329,14 +329,14 @@ fdi_load(int drive, wchar_t *fn)
/* Allocate a drive block. */
dev = (fdi_t *)malloc(sizeof(fdi_t));
memset(dev, 0x00, sizeof(fdi_t));
if (dev == NULL) {
free(dev);
memset(floppyfns[drive], 0, sizeof(floppyfns[drive]));
return;
}
memset(dev, 0x00, sizeof(fdi_t));
d86f_unregister(drive);
dev->f = plat_fopen(fn, L"rb");