diff --git a/utils.cpp b/utils.cpp index 575d328..5329657 100644 --- a/utils.cpp +++ b/utils.cpp @@ -541,7 +541,8 @@ std::string formatString(const std::string str, ...) vsnprintf(buf, 512, str.c_str(), valist); va_end(valist); - std::string result(buf, 512); + size_t len = strlen(buf); + std::string result(buf, len); return result; }