mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 18:57:34 +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_size == 0) {
|
||||||
if (!str_value)
|
if (!str_value)
|
||||||
FMT_THROW(FormatError("string pointer is null"));
|
FMT_THROW(FormatError("string pointer is null"));
|
||||||
if (*str_value)
|
else if (*str_value)
|
||||||
str_size = std::char_traits<StrChar>::length(str_value);
|
str_size = std::char_traits<StrChar>::length(str_value);
|
||||||
}
|
}
|
||||||
std::size_t precision = spec.precision_;
|
std::size_t precision = spec.precision_;
|
||||||
|
Reference in New Issue
Block a user