fix Attr stuff

This commit is contained in:
Chris Danford
2005-10-18 07:00:33 +00:00
parent ac76715d21
commit b2e9c616c8
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -440,7 +440,7 @@ unsigned XNode::Load( const CString &xml, PARSEINFO *pi, unsigned iOffset )
// Return : converted plain string
bool XNode::GetAttrXML( RageFileBasic &f, DISP_OPT *opt, const CString &sName, const CString &sValue ) const
{
CString s(sName);
CString s(sValue);
if( opt && opt->reference_value )
ReplaceEntityText( s, g_mapCharsToEntities );
return f.Write(sName + "='" + s + "' ") != -1;
@@ -470,7 +470,7 @@ bool XNode::GetXML( RageFileBasic &f, DISP_OPT *opt ) const
if( f.Write(" ") == -1 )
return false;
FOREACH_CONST_Attr( this, p )
if( GetAttrXML(f, opt, p->first, p->second) )
if( !GetAttrXML(f, opt, p->first, p->second) )
return false;
if( m_childs.empty() && m_sValue.empty() )