[ros-diffs] [greatlrd] 16682: fix bug in date if the input arg are
not right dateformat, it should prom after new date
greatlrd at svn.reactos.com
greatlrd at svn.reactos.com
Thu Jul 21 19:24:19 CEST 2005
fix bug in date if the input arg are not right dateformat, it should
prom after new date
Modified: trunk/reactos/subsys/system/cmd/date.c
_____
Modified: trunk/reactos/subsys/system/cmd/date.c
--- trunk/reactos/subsys/system/cmd/date.c 2005-07-21 16:28:20 UTC
(rev 16681)
+++ trunk/reactos/subsys/system/cmd/date.c 2005-07-21 17:24:15 UTC
(rev 16682)
@@ -243,13 +243,25 @@
}
else
{
- if (ParseDate (arg[nDateString]))
- {
- freep (arg);
- return 0;
- }
-
- ConErrResPuts(STRING_DATE_ERROR);
+ 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);
+ return 0;
+ }
+ }
+ }
}
freep (arg);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050721/11dacccb/attachment.html
More information about the Ros-diffs
mailing list