From 61e76f51ad53cecd795d641c6eb949c64f107972 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 25 Feb 2002 08:54:10 +0000 Subject: [PATCH] no message --- stepmania/src/Song.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index e07039bdd3..44f5fc535e 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -772,8 +772,13 @@ void Song::SaveOffsetChangeToDisk() CString sLine = arrayLines[i]; if( -1 != sLine.Find("#GAP") ) { + // Discover whether the GAP line has a semicolon at the end. + // If it doesn't then the semicolon is probably on the next line + // and we don't want to write a second semicolon! + bool bHasSemiColon = -1 != sLine.Find(";"); + // replace with new offset - fileOut.WriteString( ssprintf("#GAP:%d;\n", roundf(GetBeatOffsetInSeconds()*-1*1000)) ); + fileOut.WriteString( ssprintf("#GAP:%d%s\n", roundf(GetBeatOffsetInSeconds()*-1*1000), bHasSemiColon ? ";" : "") ); } else {