%foo% where foo is not a envir var should be returned as %foo% not as "".
Modified: trunk/reactos/subsys/system/cmd/cmd.c
--- trunk/reactos/subsys/system/cmd/cmd.c 2005-11-06 13:30:42 UTC (rev 19027) +++ trunk/reactos/subsys/system/cmd/cmd.c 2005-11-06 16:11:01 UTC (rev 19028) @@ -1175,7 +1175,9 @@
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