Fix startup crash on macOS when loading floppy images

This commit is contained in:
Cacodemon345
2021-11-12 01:30:31 +06:00
committed by GitHub
parent ed4a14f0cf
commit 64d4286061

View File

@@ -497,7 +497,7 @@ fdd_load(int drive, char *fn)
while (loaders[c].ext) { while (loaders[c].ext) {
if (!strcasecmp(p, (char *) loaders[c].ext) && (size == loaders[c].size || loaders[c].size == -1)) { if (!strcasecmp(p, (char *) loaders[c].ext) && (size == loaders[c].size || loaders[c].size == -1)) {
driveloaders[drive] = c; driveloaders[drive] = c;
strcpy(floppyfns[drive], fn); if (floppyfns[drive] != fn) strcpy(floppyfns[drive], fn);
d86f_setup(drive); d86f_setup(drive);
loaders[c].load(drive, floppyfns[drive]); loaders[c].load(drive, floppyfns[drive]);
drive_empty[drive] = 0; drive_empty[drive] = 0;