fix off-by-one in strptime %j

tm_yday range is 0-365 while %j is 1-366
This commit is contained in:
Julien Ramseier 2017-03-21 12:30:03 -04:00 committed by Rich Felker
parent 9571c5314a
commit 85dfab7eaf
1 changed files with 1 additions and 0 deletions

View File

@ -73,6 +73,7 @@ char *strptime(const char *restrict s, const char *restrict f, struct tm *restri
dest = &tm->tm_yday;
min = 1;
range = 366;
adj = 1;
goto numeric_range;
case 'm':
dest = &tm->tm_mon;