Fix newline accumulation in SM data.

This commit is contained in:
Glenn Maynard
2003-09-15 06:22:36 +00:00
parent 9fea069bc7
commit 8b0d16205f
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -134,7 +134,7 @@ CString NoteDataUtil::GetSMNoteDataString(NoteData &in)
float fLastBeat = in.GetLastBeat();
int iLastMeasure = int( fLastBeat/BEATS_PER_MEASURE );
CString sRet;
CString sRet = "\n"; /* data begins on a new line when written to disk */
for( int m=0; m<=iLastMeasure; m++ ) // foreach measure
{
+4 -1
View File
@@ -104,7 +104,10 @@ void NotesWriterSM::WriteSMNotesTag( const Steps &in, FILE* fp )
CStringArray asRadarValues;
for( int r=0; r < NUM_RADAR_CATEGORIES; r++ )
asRadarValues.push_back( ssprintf("%.3f", in.GetRadarValues()[r]) );
fprintf( fp, " %s:\n", join(",",asRadarValues).c_str() );
/* Don't append a newline here; it's added in NoteDataUtil::GetSMNoteDataString.
* If we add it here, then every time we write unmodified data we'll add an extra
* newline and they'll accumulate. */
fprintf( fp, " %s:", join(",",asRadarValues).c_str() );
fprintf( fp, "%s;\n", in.GetSMNoteData().c_str() );
}