diff --git a/reactos/subsys/system/cmd/cmd.c b/reactos/subsys/system/cmd/cmd.c index 60a7a9ffc72..463af51eb1a 100644 --- a/reactos/subsys/system/cmd/cmd.c +++ b/reactos/subsys/system/cmd/cmd.c @@ -1175,7 +1175,9 @@ GetEnvVarOrSpecial ( LPCTSTR varName ) return ret; } - return _T(""); /* not found - return empty string */ + GrowIfNecessary(_tcslen(varName) + 2, &ret, &retlen); + _stprintf(ret,_T("%%%s%%"),varName); + return ret; /* not found - return orginal string */ } LPCTSTR