mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
fix bug in date if the input arg are not right dateformat, it should prom after new date
svn path=/trunk/; revision=16682
This commit is contained in:
parent
58f5ef812e
commit
daeb68b5cc
1 changed files with 19 additions and 7 deletions
|
@ -243,13 +243,25 @@ INT cmd_date (LPTSTR cmd, LPTSTR param)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ParseDate (arg[nDateString]))
|
if (!ParseDate (arg[nDateString]))
|
||||||
|
{
|
||||||
|
while (TRUE) /* forever loop */
|
||||||
|
{
|
||||||
|
TCHAR s[40];
|
||||||
|
ConErrResPuts(STRING_DATE_ERROR);
|
||||||
|
|
||||||
|
PrintDateString ();
|
||||||
|
ConInString (s, 40);
|
||||||
|
|
||||||
|
while (*s && s[_tcslen (s) - 1] < _T(' '))
|
||||||
|
s[_tcslen (s) - 1] = _T('\0');
|
||||||
|
if (ParseDate (s))
|
||||||
{
|
{
|
||||||
freep (arg);
|
freep (arg);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ConErrResPuts(STRING_DATE_ERROR);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
freep (arg);
|
freep (arg);
|
||||||
|
|
Loading…
Reference in a new issue