diff --git a/include/fmt/format.h b/include/fmt/format.h index 87a34b97..18285996 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1394,7 +1394,7 @@ FMT_CONSTEXPR inline auto format_uint(It out, UInt value, int num_digits, return out; } // Buffer should be large enough to hold all digits (digits / BASE_BITS + 1). - char buffer[num_bits() / BASE_BITS + 1]; + char buffer[num_bits() / BASE_BITS + 1] = {}; format_uint(buffer, value, num_digits, upper); return detail::copy_str_noinline(buffer, buffer + num_digits, out); }