From 4e40ee49bba3f7bab05a58516e2039351fb33069 Mon Sep 17 00:00:00 2001 From: Daniel Vassdal Date: Sat, 18 May 2013 11:35:10 -0700 Subject: Replaced vsnprintf with VAFORMAT pretty much everywhere. --- src/logger.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/logger.cpp') diff --git a/src/logger.cpp b/src/logger.cpp index b33f65ac4..2b0b623f6 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -296,18 +296,11 @@ bool LogManager::DelLogType(const std::string &type, LogStream *l) void LogManager::Log(const std::string &type, int loglevel, const char *fmt, ...) { if (Logging) - { return; - } - - va_list a; - static char buf[65536]; - - va_start(a, fmt); - vsnprintf(buf, 65536, fmt, a); - va_end(a); - this->Log(type, loglevel, std::string(buf)); + std::string buf; + VAFORMAT(buf, fmt, fmt); + this->Log(type, loglevel, buf); } void LogManager::Log(const std::string &type, int loglevel, const std::string &msg) -- cgit v1.2.3