Color formatting fixed for wide strings (fixes issue #1594) (#1596)

* Use std::char_traits::length for ansi_color_escape::begin

-Fixes issue #1594 https://github.com/fmtlib/fmt/issues/1594
This commit is contained in:
Spirrwell authored and GitHub committed 2020-03-17 06:24:42 -07:00
1 parent 026f99178e
commit 2559983e7a
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -412,7 +412,7 @@ template <typename Char> struct ansi_color_escape {
FMT_CONSTEXPR const Char* begin() const FMT_NOEXCEPT { return buffer; }
FMT_CONSTEXPR const Char* end() const FMT_NOEXCEPT {
return buffer + std::strlen(buffer);
return buffer + std::char_traits<Char>::length(buffer);
}
private: