From 4873e924d7aca39d56ba3c7d53decf907de23873 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sat, 15 Dec 2007 23:21:30 +0000 Subject: [PATCH] Strip the newlines off of the XML before the Warn(). Also, we should never pass user-supplied data as a format string. --- stepmania/src/Background.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 6dee7b4bf8..3192a0cb66 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -723,7 +723,9 @@ void BackgroundImpl::Layer::UpdateCurBGChange( const Song *pSong, float fLastMus if( iter == m_BGAnimations.end() ) { XNode *pNode = change.m_def.CreateNode(); - LOG->Warn( "Tried to switch to a background that was never loaded\n" + XmlFileUtil::GetXML(pNode) ); + RString xml = XmlFileUtil::GetXML( pNode ); + Trim( xml ); + LOG->Warn( "Tried to switch to a background that was never loaded:\n%s", xml.c_str() ); SAFE_DELETE( pNode ); return; }