mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-19 20:18:49 +00:00
Fix potential segfault when exceptions are disabled
This commit is contained in:
parent
a9582bb1a2
commit
22d572d7a2
@ -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_;
|
||||
|
Loading…
Reference in New Issue
Block a user