提交 85dfab7e 编写于 作者: J Julien Ramseier 提交者: Rich Felker

fix off-by-one in strptime %j

tm_yday range is 0-365 while %j is 1-366
上级 9571c531
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册