Fix a bug that prevents "00" being used as a valid year. Why bother in

2002? It is a bug. Might as well close the PR.

PR:		misc/14511
Submitted by:	Mike Pritchard <mpp@mpp.pro-ns.net>
MFC after:	3 days
This commit is contained in:
Crist J. Clark 2002-03-18 09:49:18 +00:00
parent bbb467cd9a
commit 92b19a5754

View File

@ -113,7 +113,7 @@ atot(p, store)
if (!(t = strtok((char *)NULL, " \t,")) || !isdigit(*t))
goto bad;
year = atoi(t);
if (day < 1 || day > 31 || month < 1 || month > 12 || !year)
if (day < 1 || day > 31 || month < 1 || month > 12)
goto bad;
/* Allow two digit years 1969-2068 */
if (year < 69)