Place each info log message on a new line.
TRAC #22635
Signed-off-by: Jamie Madill
Signed-off-by: Shannon Woods
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1956 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Program.cpp b/src/libGLESv2/Program.cpp
index 48a0850..c38aa5a 100644
--- a/src/libGLESv2/Program.cpp
+++ b/src/libGLESv2/Program.cpp
@@ -1,6 +1,6 @@
#include "precompiled.h"
//
-// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -85,7 +85,7 @@
}
while (found != std::string::npos);
- append("%s\n", msg.c_str());
+ append("%s", msg.c_str());
}
void InfoLog::append(const char *format, ...)
@@ -106,15 +106,17 @@
if (!mInfoLog)
{
- mInfoLog = new char[infoLength + 1];
+ mInfoLog = new char[infoLength + 2];
strcpy(mInfoLog, info);
+ strcpy(mInfoLog + infoLength, "\n");
}
else
{
size_t logLength = strlen(mInfoLog);
- char *newLog = new char[logLength + infoLength + 1];
+ char *newLog = new char[logLength + infoLength + 2];
strcpy(newLog, mInfoLog);
strcpy(newLog + logLength, info);
+ strcpy(newLog + logLength + infoLength, "\n");
delete[] mInfoLog;
mInfoLog = newLog;