diff --git a/include/fmt/color.h b/include/fmt/color.h index 39c52c2f..e79ebe39 100644 --- a/include/fmt/color.h +++ b/include/fmt/color.h @@ -514,7 +514,7 @@ template <> inline void reset_color(FILE* stream) FMT_NOEXCEPT { template inline void reset_color(basic_memory_buffer& buffer) FMT_NOEXCEPT { const char* begin = data::RESET_COLOR; - const char* end = begin + sizeof(data::RESET_COLOR) - 1; + const char* end = begin + std::char_traits::length(data::RESET_COLOR); buffer.append(begin, end); }