[CMD] The "special" environment-like variables are available only when extensions are enabled.

The "special" variables are: CD, DATE, TIME, RANDOM,
CMDCMDLINE, CMDEXTVERSION, ERRORLEVEL (and on Win7+,
HIGHESTNUMANODENUMBER).
This commit is contained in:
Hermès Bélusca-Maïto 2020-07-12 23:27:35 +02:00
parent 41a93a4e58
commit 04e0fe0652
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -902,7 +902,11 @@ GetEnvVarOrSpecial(LPCTSTR varName)
if (var)
return var;
/* env var doesn't exist, look for a "special" one */
/* The environment variable doesn't exist, look for
* a "special" one only if extensions are enabled. */
if (!bEnableExtensions)
return NULL;
/* %CD% */
if (_tcsicmp(varName, _T("CD")) == 0)
{