From f35a042f42d36c327dc7a0759bca9126f2fcc2d5 Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 10 Nov 2023 22:53:56 +0100 Subject: [PATCH] Moved the sanity checks to the correct place. --- src/disk/mo.c | 6 +++--- src/disk/zip.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/disk/mo.c b/src/disk/mo.c index dda4222ca..27bf7e5e0 100644 --- a/src/disk/mo.c +++ b/src/disk/mo.c @@ -2147,14 +2147,14 @@ mo_hard_reset(void) dev = (mo_t *) mo_drives[c].priv; + if (dev->tf == NULL) + continue; + dev->id = c; dev->drv = &mo_drives[c]; mo_init(dev); - if (dev->tf == NULL) - continue; - if (strlen(mo_drives[c].image_path)) mo_load(dev, mo_drives[c].image_path); diff --git a/src/disk/zip.c b/src/disk/zip.c index 69af18e74..887a9c68e 100644 --- a/src/disk/zip.c +++ b/src/disk/zip.c @@ -2386,14 +2386,14 @@ zip_hard_reset(void) dev = (zip_t *) zip_drives[c].priv; + if (dev->tf == NULL) + continue; + dev->id = c; dev->drv = &zip_drives[c]; zip_init(dev); - if (dev->tf == NULL) - continue; - if (strlen(zip_drives[c].image_path)) zip_load(dev, zip_drives[c].image_path);