diff options
author | Julien Ramseier <j.ramseier@gmail.com> | 2017-03-21 12:30:03 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2017-03-21 12:30:03 -0400 |
commit | 85dfab7eaf1624577ec6de8375fd771ef9b4672a (patch) | |
tree | 675e1773f40230138bf2aa243655390c22ac5b06 /src/time | |
parent | 9571c5314a8064eda8a56faa2ae2aeced34497a3 (diff) | |
download | musl-85dfab7eaf1624577ec6de8375fd771ef9b4672a.tar.gz musl-85dfab7eaf1624577ec6de8375fd771ef9b4672a.tar.bz2 musl-85dfab7eaf1624577ec6de8375fd771ef9b4672a.tar.xz musl-85dfab7eaf1624577ec6de8375fd771ef9b4672a.zip |
fix off-by-one in strptime %j
tm_yday range is 0-365 while %j is 1-366
Diffstat (limited to 'src/time')
-rw-r--r-- | src/time/strptime.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |