diff --git a/include/fmt/color.h b/include/fmt/color.h index 4571597c..8bfb5e0d 100644 --- a/include/fmt/color.h +++ b/include/fmt/color.h @@ -529,13 +529,12 @@ void vprint(std::FILE* f, const text_style& ts, const S& format, basic_format_args>> args) { basic_memory_buffer buf; detail::vformat_to(buf, ts, to_string_view(format), args); - buf.push_back(Char(0)); -#ifdef _WIN32 if (detail::is_utf8()) detail::print(f, basic_string_view(buf.begin(), buf.size())); - else -#endif + else { + buf.push_back(Char(0)); detail::fputs(buf.data(), f); + } } /**