From: Julien Ramseier Date: Tue, 21 Mar 2017 16:30:03 +0000 (-0400) Subject: fix off-by-one in strptime %j X-Git-Tag: v1.1.17~81 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=85dfab7eaf1624577ec6de8375fd771ef9b4672a;p=oweals%2Fmusl.git fix off-by-one in strptime %j tm_yday range is 0-365 while %j is 1-366 --- diff --git a/src/time/strptime.c b/src/time/strptime.c index 55c7ed1b..da9e1f42 100644 --- a/src/time/strptime.c +++ b/src/time/strptime.c @@ -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;