projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9571c53
)
fix off-by-one in strptime %j
author
Julien Ramseier
<j.ramseier@gmail.com>
Tue, 21 Mar 2017 16:30:03 +0000
(12:30 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Tue, 21 Mar 2017 16:30:03 +0000
(12:30 -0400)
tm_yday range is 0-365 while %j is 1-366
src/time/strptime.c
patch
|
blob
|
history
diff --git
a/src/time/strptime.c
b/src/time/strptime.c
index 55c7ed1b4bc7f40d2983e4b382c946b6ec77cd0c..da9e1f42c3c932a5dc4ea08b9ac2fa3bc403e2f5 100644
(file)
--- 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;