From 2cc2f07f8df2ea1168bd7f2d9ac078deae6b068d Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 6 Aug 2005 05:42:21 +0000 Subject: [PATCH] add lua bindings use profileID as the key in the map, not the profile dir --- stepmania/src/ProfileManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ProfileManager.cpp b/stepmania/src/ProfileManager.cpp index 7b04d68baa..dad2569b46 100644 --- a/stepmania/src/ProfileManager.cpp +++ b/stepmania/src/ProfileManager.cpp @@ -133,7 +133,7 @@ bool ProfileManager::LoadLocalProfileFromMachine( PlayerNumber pn ) m_bWasLoadedFromMemoryCard[pn] = false; m_bLastLoadWasFromLastGood[pn] = false; - map::iterator iter = g_mapLocalProfileIdToProfile.find( m_sProfileDir[pn] ); + map::iterator iter = g_mapLocalProfileIdToProfile.find( sProfileID ); if( iter == g_mapLocalProfileIdToProfile.end() ) { m_sProfileDir[pn] = ""; @@ -304,7 +304,8 @@ const Profile* ProfileManager::GetProfile( PlayerNumber pn ) const } else { - map::iterator iter = g_mapLocalProfileIdToProfile.find( m_sProfileDir[pn] ); + CString sProfileID = LocalProfileDirToId( m_sProfileDir[pn] ); + map::iterator iter = g_mapLocalProfileIdToProfile.find( sProfileID ); ASSERT( iter != g_mapLocalProfileIdToProfile.end() ); return iter->second; }