From: Toni Wilen Date: Sun, 31 Aug 2025 09:02:23 +0000 (+0300) Subject: reading uaehfx-only config entries: support both real HD paths and HDF paths. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=ef137d47785ebd6881076e6ed7dca063eba0a970;p=francis%2Fwinuae.git reading uaehfx-only config entries: support both real HD paths and HDF paths. --- diff --git a/cfgfile.cpp b/cfgfile.cpp index 1665b5c3..46208d1d 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -5315,6 +5315,7 @@ static int cfgfile_parse_newfilesys (struct uae_prefs *p, int nr, int type, TCHA if (! getintval (&tmpp, &uci.bootpri, 0)) goto empty_fs; } else if (type == 1 || ((type == 2 || type == 3 || type == 4) && uaehfentry)) { + bool midmarker = false; tmpp = _tcschr (value, ':'); if (tmpp == 0) goto invalid_fs; @@ -5330,7 +5331,10 @@ static int cfgfile_parse_newfilesys (struct uae_prefs *p, int nr, int type, TCHA _tcscpy (uci.rootdir, n); xfree(n); tmpp = (TCHAR*)end; - *tmpp++ = 0; + midmarker = *tmpp == ':'; // :? + if (!midmarker) { + *tmpp++ = 0; + } } else { tmpp = _tcschr (tmpp, ','); if (tmpp == 0) @@ -5338,7 +5342,8 @@ static int cfgfile_parse_newfilesys (struct uae_prefs *p, int nr, int type, TCHA *tmpp++ = 0; _tcscpy (uci.rootdir, tmpp2); } - if (type == 4) { + if (type == 4 && midmarker) { + // get optional extra path const TCHAR *tmppr = tmpp; const TCHAR *tmppr2 = tmpp; TCHAR *root2 = getnextentry(&tmppr, ',');