fix weird newliesn at the end of info.txt

This commit is contained in:
Glenn Maynard
2003-12-03 02:49:54 +00:00
parent da5c0cb85e
commit 3cbe471e24
+9 -3
View File
@@ -133,9 +133,15 @@ RageLog::RageLog()
RageLog::~RageLog() RageLog::~RageLog()
{ {
/* Add the mapped log data to info.txt. */ /* Add the mapped log data to info.txt. */
/* XXX: We shouldn't do this, because we shouldn't send newlines of any kind to Info(); const CString AdditionalLog = GetAdditionalLog();
* it results in oddly delimited output ... */ vector<CString> AdditionalLogLines;
this->Info( "%s", GetAdditionalLog() ); split( AdditionalLog, "\n", AdditionalLogLines );
for( unsigned i = 0; i < AdditionalLogLines.size(); ++i )
{
TrimLeft( AdditionalLogLines[i] );
TrimRight( AdditionalLogLines[i] );
this->Info( "%s", AdditionalLogLines[i].c_str() );
}
Flush(); Flush();
ShowLogOutput( false ); ShowLogOutput( false );