From cab39e31a1818b127ea177a9c37843453c498162 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 7 Mar 2019 12:47:29 -0500 Subject: [PATCH] Don't llformat if empty fmt string. --- indra/llcommon/llformat.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/llcommon/llformat.cpp b/indra/llcommon/llformat.cpp index 7030b5f0f..834bcf753 100644 --- a/indra/llcommon/llformat.cpp +++ b/indra/llcommon/llformat.cpp @@ -42,6 +42,8 @@ // wrapper for vsnprintf to be called from llformatXXX functions. static void va_format(std::string& out, const char *fmt, va_list& va) { + if (!fmt || !fmt[0]) return; // Don't bother if null or empty c_str + typedef typename std::vector> vec_t; static thread_local vec_t charvector(1024); // Evolves into charveleon #define vsnprintf(va) std::vsnprintf(charvector.data(), charvector.capacity(), fmt, va)