Skip to content

Commit

Permalink
Zero initialize local_info in get_info
Browse files Browse the repository at this point in the history
* Even when the result is unique, the second sys_info
  should be zero initialized.
  • Loading branch information
HowardHinnant committed May 18, 2021
1 parent 6e921e1 commit b49a757
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b49a757

Please sign in to comment.