From c1b1ccfbf562ebcb04e29966076202e2a062549c Mon Sep 17 00:00:00 2001 From: yiak Date: Tue, 16 Mar 2021 14:56:14 +0800 Subject: [PATCH] Update tinyformat.h (#31612) Quick fix to https://github.com/PaddlePaddle/Paddle/issues/13860 --- paddle/fluid/string/tinyformat/tinyformat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/string/tinyformat/tinyformat.h b/paddle/fluid/string/tinyformat/tinyformat.h index a5c1798e100..7498c6a46e3 100644 --- a/paddle/fluid/string/tinyformat/tinyformat.h +++ b/paddle/fluid/string/tinyformat/tinyformat.h @@ -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"); -- GitLab