fix buffer overflow on all emphasis flags set

This commit is contained in:
dominic 2025-07-15 22:22:36 +02:00
parent 553ec11ec0
commit 3b8043376f

View File

@ -430,7 +430,7 @@ template <typename Char> struct ansi_color_escape {
private:
static constexpr size_t num_emphases = 8;
Char buffer[7u + 3u * num_emphases + 1u];
Char buffer[7u + 4u * num_emphases + 1u];
static FMT_CONSTEXPR void to_esc(uint8_t c, Char* out,
char delimiter) noexcept {