From 35b83765db8d9b831df1494a17f86ce0da961052 Mon Sep 17 00:00:00 2001 From: tomcw Date: Fri, 10 Sep 2021 14:38:40 +0100 Subject: [PATCH] Fix for command line -d2 (and -h2): if image can't be opened, this is now reported as an error. (#980) --- source/Utilities.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Utilities.cpp b/source/Utilities.cpp index 2fcd8bf6..6d8d8bb4 100644 --- a/source/Utilities.cpp +++ b/source/Utilities.cpp @@ -446,7 +446,7 @@ void InsertFloppyDisks(const UINT slot, LPCSTR szImageName_drive[NUM_DRIVES], bo } else if (szImageName_drive[DRIVE_2]) { - bRes |= DoDiskInsert(slot, DRIVE_2, szImageName_drive[DRIVE_2]); + bRes &= DoDiskInsert(slot, DRIVE_2, szImageName_drive[DRIVE_2]); LogFileOutput("Init: S%d, DoDiskInsert(D2), res=%d\n", slot, bRes); } @@ -482,7 +482,7 @@ void InsertHardDisks(LPCSTR szImageName_harddisk[NUM_HARDDISKS], bool& bBoot) if (szImageName_harddisk[HARDDISK_2]) { - bRes |= DoHardDiskInsert(HARDDISK_2, szImageName_harddisk[HARDDISK_2]); + bRes &= DoHardDiskInsert(HARDDISK_2, szImageName_harddisk[HARDDISK_2]); LogFileOutput("Init: DoHardDiskInsert(HDD2), res=%d\n", bRes); }