]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Only check deeper archive path if inserted in floppy drive
authorToni Wilen <twilen@winuae.net>
Sun, 26 Nov 2023 14:31:32 +0000 (16:31 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 26 Nov 2023 14:31:32 +0000 (16:31 +0200)
od-win32/win32gui.cpp

index de6e43cbc4ff29829e721d589f1961e9cf5db902..bf3fa74f2e06413a0b72dee8b0e3326c5e337e4e 100644 (file)
@@ -22519,8 +22519,9 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage)
                                                if (type == ZFILE_ROM) {
                                                        rd = getromdatabyzfile (z);
                                                }
-                                               // replace with decrunched path but only if decrunched path is deeper (longer)
-                                               if (type > 0 && _tcslen(z->name) > _tcslen(file)) {
+                                               // replace with decrunched path but only if
+                                               // floppy insert and decrunched path is deeper (longer)
+                                               if (type > 0 && _tcslen(z->name) > _tcslen(file) && drv >= 0) {
                                                        _tcscpy(filepath, z->name);
                                                }
                                        }