mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Fixed a bug that crashed cmd when "cd /D" but no path. Bug reported by Harteex.
svn path=/trunk/; revision=17611
This commit is contained in:
parent
72784f6c8f
commit
99c1fbbdfc
1 changed files with 8 additions and 1 deletions
|
@ -296,9 +296,16 @@ INT cmd_chdir (LPTSTR cmd, LPTSTR param)
|
|||
{
|
||||
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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue