From 8428fc6cfc726660d9eb290d5c0823d6f593e05a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 6 Dec 2004 07:32:29 +0000 Subject: [PATCH] fix obscure memory leak --- stepmania/src/NotesLoaderSM.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stepmania/src/NotesLoaderSM.cpp b/stepmania/src/NotesLoaderSM.cpp index d5ec793ddc..158cfe424c 100644 --- a/stepmania/src/NotesLoaderSM.cpp +++ b/stepmania/src/NotesLoaderSM.cpp @@ -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);