From d5e39670b8f4cf86ed605380e6fb0fddb44affbe Mon Sep 17 00:00:00 2001 From: Tanki Zhang Date: Wed, 9 Oct 2019 00:32:18 -0400 Subject: [PATCH] properly use retset_color to append the reset_color marker --- include/fmt/color.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/fmt/color.h b/include/fmt/color.h index 3d0668e6..a6fb675e 100644 --- a/include/fmt/color.h +++ b/include/fmt/color.h @@ -524,8 +524,7 @@ void vprint(std::FILE* f, const text_style& ts, const S& format, format_to( buf, "{}", format ); if (has_style) { - size_t retset_color_char_count = sizeof( internal::data::reset_color ) / (*internal::data::reset_color); - buf.append(internal::data::reset_color, internal::data::reset_color + retset_color_char_count); + reset_color( buf ); }