From b2e9c616c8d8d42ef09b7b9c101993883722e888 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 18 Oct 2005 07:00:33 +0000 Subject: [PATCH] fix Attr stuff --- stepmania/src/ProfileManager.cpp | 3 ++- stepmania/src/XmlFile.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/stepmania/src/ProfileManager.cpp b/stepmania/src/ProfileManager.cpp index 6f3a92c4e8..275c96a212 100644 --- a/stepmania/src/ProfileManager.cpp +++ b/stepmania/src/ProfileManager.cpp @@ -94,7 +94,8 @@ void ProfileManager::Init() Character *pCharacter = CHARMAN->GetCharacterFromID( sCharacterID ); ASSERT_M( pCharacter, sCharacterID ); CString sProfileID; - CreateLocalProfile( pCharacter->GetDisplayName(), sProfileID ); + bool b = CreateLocalProfile( pCharacter->GetDisplayName(), sProfileID ); + ASSERT( b ); Profile* pProfile = GetLocalProfile( sProfileID ); pProfile->m_sCharacterID = sCharacterID; SaveLocalProfile( sProfileID ); diff --git a/stepmania/src/XmlFile.cpp b/stepmania/src/XmlFile.cpp index d17fc74e55..d3cab6763b 100644 --- a/stepmania/src/XmlFile.cpp +++ b/stepmania/src/XmlFile.cpp @@ -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() )