From b1a02a6d137be594542741bde9f6c6b4571cd43b Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 13 Mar 2025 20:59:59 +0100 Subject: [PATCH] Windows CD-ROM disc change notification: verify the correct bit of the unit mask. --- src/qt/qt_winrawinputfilter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/qt_winrawinputfilter.cpp b/src/qt/qt_winrawinputfilter.cpp index 13e0ec9a7..cff9950b2 100644 --- a/src/qt/qt_winrawinputfilter.cpp +++ b/src/qt/qt_winrawinputfilter.cpp @@ -160,7 +160,7 @@ notify_drives(ULONG unitmask, int empty) char p[1024] = { 0 }; for (int i = 0; i < 26; ++i) { - if (unitmask & 0x1) { + if (unitmask & (1 << i)) { cdrom_t *dev = NULL; sprintf(p, "ioctl://\\\\.\\%c:", 'A' + i);