From 2d224bd3b1463400f09de27cab78e5f5e5476bbe Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 2 Sep 2015 17:41:19 -0400 Subject: [PATCH] ActionReplay: Remove an alloca call --- Source/Core/Core/ActionReplay.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/ActionReplay.cpp b/Source/Core/Core/ActionReplay.cpp index 0b70808fc7..504c202e13 100644 --- a/Source/Core/Core/ActionReplay.cpp +++ b/Source/Core/Core/ActionReplay.cpp @@ -229,16 +229,14 @@ static void LogInfo(const char *format, ...) { if (LogManager::GetMaxLevel() >= LogTypes::LINFO || logSelf) { - char* temp = (char*)alloca(strlen(format)+512); va_list args; va_start(args, format); - CharArrayFromFormatV(temp, 512, format, args); + std::string text = StringFromFormatV(format, args); va_end(args); - INFO_LOG(ACTIONREPLAY, "%s", temp); + INFO_LOG(ACTIONREPLAY, "%s", text.c_str()); if (logSelf) { - std::string text = temp; text += '\n'; arLog.push_back(text); }