]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Ignore environment variable if it wasn't resolved.
authorToni Wilen <twilen@winuae.net>
Sat, 26 Jan 2019 14:42:32 +0000 (16:42 +0200)
committerToni Wilen <twilen@winuae.net>
Sat, 26 Jan 2019 14:42:32 +0000 (16:42 +0200)
cfgfile.cpp

index e63df7486776a4317b060531145b661d6f3c5c79..9ca3b322f4d15519b9a437e903db11ad588ec82d 100644 (file)
@@ -606,6 +606,10 @@ static TCHAR *cfgfile_subst_path2 (const TCHAR *path, const TCHAR *subst, const
                _tcscat (p, file + l);
                p2 = target_expand_environment (p, NULL, 0);
                xfree (p);
+               if (p2 && p2[0] == '$') {
+                       xfree(p2);
+                       return NULL;
+               }
                return p2;
        }
        return NULL;