From: Toni Wilen Date: Sat, 9 Jun 2018 07:05:13 +0000 (+0300) Subject: rootdir is static array since long time ago. X-Git-Tag: 4000~24 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=d093b114d960311ab8514f89d0ea2b0b50928611;p=francis%2Fwinuae.git rootdir is static array since long time ago. --- 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) {