Update tinyformat.h (#31612)

Quick fix to https://github.com/PaddlePaddle/Paddle/issues/13860
test_benchmark_ci
yiak 4 years ago committed by GitHub
parent 9c624b16d5
commit c1b1ccfbf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -777,7 +777,7 @@ inline void formatImpl(std::ostream &out, const char *fmt,
// Print remaining part of format string.
fmt = printFormatStringLiteral(out, fmt);
if (*fmt != '\0')
if (fmt != nullptr && *fmt != '\0' && *fmt != 0)
TINYFORMAT_ERROR(
"tinyformat: Too many conversion specifiers in format string");

Loading…
Cancel
Save