mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
- fix cmd not to crash when just typing "start" [enter]
See issue #2294 for more details. svn path=/trunk/; revision=27955
This commit is contained in:
parent
0a931f1a75
commit
c697530b17
1 changed files with 3 additions and 3 deletions
|
@ -97,7 +97,7 @@ INT cmd_start (LPTSTR First, LPTSTR Rest)
|
|||
return 1;
|
||||
}
|
||||
SetLastError(0);
|
||||
size = GetEnvironmentVariable (_T("COMSPEC"), comspec, 512);
|
||||
size = GetEnvironmentVariable (_T("COMSPEC"), comspec, MAX_PATH);
|
||||
if(GetLastError() == ERROR_ENVVAR_NOT_FOUND)
|
||||
{
|
||||
RestWithoutArgs[0] = _T('c');
|
||||
|
@ -127,7 +127,7 @@ INT cmd_start (LPTSTR First, LPTSTR Rest)
|
|||
_tcscat(RestWithoutArgs,_T("\""));
|
||||
}
|
||||
|
||||
rest = malloc ( _tcslen(RestWithoutArgs) + 1 * sizeof(TCHAR));
|
||||
rest = malloc ( (_tcslen(RestWithoutArgs) + 1) * sizeof(TCHAR));
|
||||
if (rest == NULL)
|
||||
{
|
||||
if(comspec != NULL)
|
||||
|
@ -136,7 +136,7 @@ INT cmd_start (LPTSTR First, LPTSTR Rest)
|
|||
return 1;
|
||||
}
|
||||
|
||||
param =malloc ( _tcslen(RestWithoutArgs) + 1 * sizeof(TCHAR));
|
||||
param =malloc ( (_tcslen(RestWithoutArgs) + 1) * sizeof(TCHAR));
|
||||
if (rest == NULL)
|
||||
{
|
||||
if(comspec != NULL)
|
||||
|
|
Loading…
Reference in a new issue