summaryrefslogtreecommitdiff
path: root/src/time
diff options
context:
space:
mode:
authorJulien Ramseier <j.ramseier@gmail.com>2017-03-21 12:30:03 -0400
committerRich Felker <dalias@aerifal.cx>2017-03-21 12:30:03 -0400
commit85dfab7eaf1624577ec6de8375fd771ef9b4672a (patch)
tree675e1773f40230138bf2aa243655390c22ac5b06 /src/time
parent9571c5314a8064eda8a56faa2ae2aeced34497a3 (diff)
downloadmusl-85dfab7eaf1624577ec6de8375fd771ef9b4672a.tar.gz
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.c1
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;