diff --git a/include/fmt/format.h b/include/fmt/format.h index 5149fd66..108307eb 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -553,7 +553,7 @@ FMT_CONSTEXPR auto fill_n(OutputIt out, Size count, const T& value) template FMT_CONSTEXPR20 auto fill_n(T* out, Size count, char value) -> T* { if (is_constant_evaluated()) return fill_n(out, count, value); - std::memset(out, value, to_unsigned(count)); + std::memset(out, value, to_unsigned(count) * sizeof(T)); return out + count; }