Skip to content

Commit

Permalink
Merge pull request #2945 from lioncash/alloca
Browse files Browse the repository at this point in the history
ActionReplay: Remove an alloca call
  • Loading branch information
phire committed Sep 3, 2015
2 parents 3b65c40 + 2d224bd commit 34c7f34
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Source/Core/Core/ActionReplay.cpp
Expand Up @@ -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);
}
Expand Down

0 comments on commit 34c7f34

Please sign in to comment.