fix obscure memory leak

This commit is contained in:
Glenn Maynard
2004-12-06 07:32:29 +00:00
parent 0745485124
commit 8428fc6cfc
+6 -6
View File
@@ -344,15 +344,15 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
else if( 0==stricmp(sValueName,"NOTES") || 0==stricmp(sValueName,"NOTES2") )
{
Steps* pNewNotes = new Steps;
ASSERT( pNewNotes );
if( iNumParams < 7 )
{
LOG->Trace( "The song file '%s' is has %d fields in a #NOTES tag, but should have at least %d.", sPath.c_str(), iNumParams, 7 );
continue;
}
Steps* pNewNotes = new Steps;
ASSERT( pNewNotes );
LoadFromSMTokens(
sParams[1],
sParams[2],
@@ -447,15 +447,15 @@ bool SMLoader::LoadEdit( CString sEditFilePath, ProfileSlot slot )
return false;
}
Steps* pNewNotes = new Steps;
ASSERT( pNewNotes );
if( iNumParams < 7 )
{
LOG->Trace( "The song file '%s' is has %d fields in a #NOTES tag, but should have at least %d.", sEditFilePath.c_str(), iNumParams, 7 );
continue;
}
Steps* pNewNotes = new Steps;
ASSERT( pNewNotes );
LoadFromSMTokens(
sParams[1], sParams[2], sParams[3], sParams[4], sParams[5], sParams[6],
*pNewNotes);