Zero initialize local_info in get_info

* Even when the result is unique, the second sys_info
  should be zero initialized.
This commit is contained in:
Howard Hinnant
2021-05-18 16:15:31 -04:00
parent 6e921e1b1d
commit b49a7575eb

View File

@@ -2164,7 +2164,7 @@ time_zone::get_info_impl(local_seconds tp) const
{
using namespace std::chrono;
init();
local_info i;
local_info i{};
i.result = local_info::unique;
auto tr = upper_bound(transitions_.begin(), transitions_.end(), tp,
[](const local_seconds& x, const transition& t)