Changed to use strlen instead of sizeof to determine the length of a string.

Addresses #1063.
This commit is contained in:
Michael Winterberg 2019-03-04 11:08:13 -08:00
parent 287eaab3b2
commit b67a85dab6

View File

@ -514,7 +514,7 @@ template <> inline void reset_color<wchar_t>(FILE* stream) FMT_NOEXCEPT {
template <typename Char>
inline void reset_color(basic_memory_buffer<Char>& 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<char>::length(data::RESET_COLOR);
buffer.append(begin, end);
}