From d093b114d960311ab8514f89d0ea2b0b50928611 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 9 Jun 2018 10:05:13 +0300 Subject: [PATCH] rootdir is static array since long time ago. --- filesys.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/filesys.cpp b/filesys.cpp index 5a93b483..d7f0ab8b 100644 --- a/filesys.cpp +++ b/filesys.cpp @@ -334,7 +334,7 @@ int get_filesys_unitconfig (struct uae_prefs *p, int index, struct mountedinfo * ui = &uitmp; if (uci->ci.type == UAEDEV_DIR) { mi->ismounted = 1; - if (uci->ci.rootdir && _tcslen (uci->ci.rootdir) == 0) + if (uci->ci.rootdir[0] == 0) return FILESYS_VIRTUAL; if (my_existsfile (uci->ci.rootdir)) { mi->ismedia = 1; @@ -2234,7 +2234,7 @@ int hardfile_media_change (struct hardfiledata *hfd, struct uaedev_config_info * if (hfd->delayedci.rootdir[0]) { hfd->reinsertdelay = 50; hfd->isreinsert = true; - write_log (_T("HARDFILE: delayed insert %d: '%s'\n"), hfd->unitnum, ci->rootdir ? ci->rootdir : _T("")); + write_log (_T("HARDFILE: delayed insert %d: '%s'\n"), hfd->unitnum, ci->rootdir[0] ? ci->rootdir : _T("")); return 0; } else { return 1; @@ -2254,7 +2254,7 @@ int hardfile_media_change (struct hardfiledata *hfd, struct uaedev_config_info * if (hfd && !hfd->drive_empty) { hfd->reinsertdelay = 50; hfd->isreinsert = false; - write_log (_T("HARDFILE: delayed eject %d: '%s'\n"), hfd->unitnum, hfd->ci.rootdir ? hfd->ci.rootdir : _T("")); + write_log (_T("HARDFILE: delayed eject %d: '%s'\n"), hfd->unitnum, hfd->ci.rootdir[0] ? hfd->ci.rootdir : _T("")); return 0; } if (!hfd) { -- 2.47.3