diff --git a/stepmania/src/XmlFileUtil.cpp b/stepmania/src/XmlFileUtil.cpp index 9b1b7c1b15..f0548e08dc 100644 --- a/stepmania/src/XmlFileUtil.cpp +++ b/stepmania/src/XmlFileUtil.cpp @@ -404,7 +404,7 @@ bool GetAttrXML( RageFileBasic &f, const RString &sName, const RString &sValue ) { RString s(sValue); ReplaceEntityText( s, g_mapCharsToEntities ); - return f.Write(sName + "='" + s + "' ") != -1; + return f.Write( sName ) != -1 && f.Write( "='" ) != -1 && f.Write( s ) && f.Write( "' " ) != -1; } bool GetXMLInternal( const XNode *pNode, RageFileBasic &f, bool bWriteTabs, int &iTabBase ) @@ -418,7 +418,7 @@ bool GetXMLInternal( const XNode *pNode, RageFileBasic &f, bool bWriteTabs, int return false; // GetName()) == -1 ) + if( f.Write("<") == -1 || f.Write(pNode->GetName()) == -1 ) return false; // GetName() + ">") == -1 ) + if( f.Write("GetName()) == -1 || f.Write(">") == -1 ) return false; if( !pNode->m_childs.empty() )