From 6ec9543eeffa53577da0d0f1b112d18a0b45a79f Mon Sep 17 00:00:00 2001 From: Spirrwell Date: Sun, 15 Mar 2020 22:16:14 -0400 Subject: [PATCH] Use std::char_traits::length for ansi_color_escape::begin -Fixes issue #1594 https://github.com/fmtlib/fmt/issues/1594 --- include/fmt/color.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/color.h b/include/fmt/color.h index 3756ba3f..96d9ab6b 100644 --- a/include/fmt/color.h +++ b/include/fmt/color.h @@ -412,7 +412,7 @@ template 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::length(buffer); } private: