forked from HowardHinnant/date
Fix overflow bug in parse
This commit is contained in:
4
date.h
4
date.h
@@ -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)
|
||||
|
Reference in New Issue
Block a user