Fixed a bug that crashed cmd when "cd /D" but no path. Bug reported by Harteex. Modified: trunk/reactos/subsys/system/cmd/internal.c _____
Modified: trunk/reactos/subsys/system/cmd/internal.c --- trunk/reactos/subsys/system/cmd/internal.c 2005-09-02 21:26:51 UTC (rev 17610) +++ trunk/reactos/subsys/system/cmd/internal.c 2005-09-02 22:41:40 UTC (rev 17611) @@ -296,9 +296,16 @@
{ bChangeDrive = TRUE; tmpPath = _tcsstr(param,_T(" ")); + if(!tmpPath) + { + /* Didnt find an directories */ + LoadString(CMD_ModuleHandle, STRING_ERROR_PATH_NOT_FOUND, szMsg, RC_STRING_MAX_SIZE); + ConErrPrintf(szMsg); + nErrorLevel = 1; + return 1; + } tmpPath++; _tcscpy(szPath,tmpPath); - } else {