fix Attr stuff
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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() )
|
||||
|
||||
Reference in New Issue
Block a user