Fixed CD-ROM image mounting crashes and, hopefully, Linux compiles.

This commit is contained in:
OBattler
2025-01-28 18:39:26 +01:00
parent 90e1190c92
commit 7c6f45b4cd
5 changed files with 10 additions and 8 deletions

View File

@@ -2006,6 +2006,8 @@ image_open(cdrom_t *dev, const char *path)
int ret;
const int is_cue = ((ext == 4) && !stricmp(path + strlen(path) - ext + 1, "CUE"));
img->dev = dev;
if (is_cue) {
ret = image_load_cue(img, path);
@@ -2029,8 +2031,6 @@ image_open(cdrom_t *dev, const char *path)
sprintf(n, "CD-ROM %i Image", dev->id + 1);
img->log = log_open(n);
img->dev = dev;
dev->ops = &image_ops;
}
}