From: Toni Wilen Date: Sat, 26 Jan 2019 14:42:32 +0000 (+0200) Subject: Ignore environment variable if it wasn't resolved. X-Git-Tag: 4200~76 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=f0d9b401c1a70a607073098cdbbfbfe9d493b432;p=francis%2Fwinuae.git Ignore environment variable if it wasn't resolved. --- diff --git a/cfgfile.cpp b/cfgfile.cpp index e63df748..9ca3b322 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -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;