change some strings so that stats.xml doesn't use invalid entity names

This commit is contained in:
Chris Danford
2004-03-13 10:48:15 +00:00
parent 62d1a344f2
commit ada21b9787
4 changed files with 23 additions and 19 deletions
+6 -2
View File
@@ -587,7 +587,7 @@ XNode* Profile::SaveGeneralDataCreateNode() const
{
XNode* pUnlockedSongs = pGeneralDataNode->AppendChild("UnlockedSongs");
for( set<int>::const_iterator it = m_UnlockedSongs.begin(); it != m_UnlockedSongs.end(); ++it )
pUnlockedSongs->AppendChild( ssprintf("%i", *it) );
pUnlockedSongs->AppendChild( ssprintf("Unlock%i", *it) );
}
{
@@ -726,7 +726,11 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode )
if( pUnlockedSongs )
{
FOREACH_Node( pUnlockedSongs, song )
m_UnlockedSongs.insert( atoi(song->name) );
{
int iUnlock;
if( sscanf(song->name.c_str(),"Unlock%d",&iUnlock) == 1 )
m_UnlockedSongs.insert( iUnlock );
}
}
}