Fix overflow bug in parse

This commit is contained in:
Howard Hinnant
2016-11-08 12:59:00 -08:00
parent 27964fa642
commit 33f7cc6de4

4
date.h
View File

@@ -4347,8 +4347,8 @@ parse(std::basic_istream<CharT, Traits>& is,
tp = floor<Duration>(local_days(year{tm.tm_year + 1900}/
(tm.tm_mon+1)/
(tm.tm_mday)) +
hours{tm.tm_hour} + minutes{tm.tm_min} +
seconds{tm.tm_sec} + subseconds);
subseconds + seconds{tm.tm_sec} +
minutes{tm.tm_min} + hours{tm.tm_hour});
if (abbrev != nullptr)
*abbrev = std::move(temp_abbrev);
if (offset != nullptr)