fix dumb ksf loading bug

also, if the "x - y" split fails, use the whole string, in case it's
"x - y - z"
This commit is contained in:
Glenn Maynard
2003-01-15 20:36:52 +00:00
parent 4be7a38446
commit 8cb53512e7
+2 -2
View File
@@ -172,7 +172,7 @@ bool KSFLoader::LoadFromDir( CString sDir, Song &out )
for( i=0; i<arrayKSFFileNames.size(); i++ ) for( i=0; i<arrayKSFFileNames.size(); i++ )
{ {
Notes* pNewNotes = new Notes; Notes* pNewNotes = new Notes;
if(LoadFromKSFFile( out.GetSongDir() + arrayKSFFileNames[i], *pNewNotes )) if(!LoadFromKSFFile( out.GetSongDir() + arrayKSFFileNames[i], *pNewNotes ))
{ {
delete pNewNotes; delete pNewNotes;
continue; continue;
@@ -221,7 +221,7 @@ bool KSFLoader::LoadFromDir( CString sDir, Song &out )
} }
else else
{ {
out.m_sMainTitle = asBits[0]; out.m_sMainTitle = sParams[1];
} }
for( int j=0; j<out.m_sMainTitle.GetLength(); j++ ) for( int j=0; j<out.m_sMainTitle.GetLength(); j++ )