From f97c51ce4425ae3b8365fccc2794d8c09bc42982 Mon Sep 17 00:00:00 2001 From: Kearwood Gilbert Date: Sat, 14 Dec 2013 18:13:00 -0800 Subject: [PATCH] Corrected formatting of logged messages. --HG-- extra : source : 055166b931edaf78d482a143b5c8b6898a387904 --- KREngine/kraken/KRContext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/KREngine/kraken/KRContext.cpp b/KREngine/kraken/KRContext.cpp index c11dbb1..aa44b5c 100644 --- a/KREngine/kraken/KRContext.cpp +++ b/KREngine/kraken/KRContext.cpp @@ -119,12 +119,12 @@ void KRContext::Log(log_level level, const std::string &message_format, ...) if(s_log_callback) { const int LOG_BUFFER_SIZE = 32768; char log_buffer[LOG_BUFFER_SIZE]; - snprintf(log_buffer, LOG_BUFFER_SIZE, message_format.c_str(), args); + vsnprintf(log_buffer, LOG_BUFFER_SIZE, message_format.c_str(), args); s_log_callback(s_log_callback_user_data, std::string(log_buffer), level); } else { FILE *out_file = level == LOG_LEVEL_INFORMATION ? stdout : stderr; fprintf(out_file, "Kraken - INFO: "); - fprintf(out_file, message_format.c_str(), args); + vfprintf(out_file, message_format.c_str(), args); fprintf(out_file, "\n"); }