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 -1
View File
@@ -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 );
+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() )