diff --git a/format.cc b/format.cc index a9c978b9..84447d2f 100644 --- a/format.cc +++ b/format.cc @@ -782,7 +782,7 @@ void fmt::BasicWriter::write_str( if (str_size == 0) { if (!str_value) FMT_THROW(FormatError("string pointer is null")); - if (*str_value) + else if (*str_value) str_size = std::char_traits::length(str_value); } std::size_t precision = spec.precision_;