Skip to content

Commit

Permalink
fix: zero-initialization for a unit symbol buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Mar 19, 2024
1 parent a62fdd2 commit 0644790
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/include/mp-units/unit.h
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ namespace detail {
template<typename CharT, std::size_t N, unit_symbol_formatting fmt, Unit U>
[[nodiscard]] consteval std::array<CharT, N> get_symbol_buffer(U)
{
std::array<CharT, N> buffer;
std::array<CharT, N> buffer{};
unit_symbol_to<CharT>(buffer.begin(), U{}, fmt);
return buffer;
}
Expand Down

0 comments on commit 0644790

Please sign in to comment.