mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 02:37:36 +02:00
Fix potential segfault when exceptions are disabled
This commit is contained in:
@ -782,7 +782,7 @@ void fmt::BasicWriter<Char>::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<StrChar>::length(str_value);
|
||||
}
|
||||
std::size_t precision = spec.precision_;
|
||||
|
Reference in New Issue
Block a user