From 7f845d41798081cfb8e331dbc7d21367fa90013c Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Fri, 18 May 2012 19:19:50 +0200 Subject: [PATCH] fixed line Nr count in song loading --- Vocaluxe/Lib/Song/CSong.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Lib/Song/CSong.cs b/Vocaluxe/Lib/Song/CSong.cs index dce672c1..03d69a0f 100644 --- a/Vocaluxe/Lib/Song/CSong.cs +++ b/Vocaluxe/Lib/Song/CSong.cs @@ -389,9 +389,9 @@ namespace Vocaluxe.Lib.Song TempC = (char)sr.Read(); } while ((TempC.CompareTo(':') != 0) && (TempC.CompareTo('F') != 0) && (TempC.CompareTo('*') != 0) && (TempC.CompareTo('P') != 0)); - FileLineNo++; while (!sr.EndOfStream && (TempC.CompareTo('E') != 0)) { + FileLineNo++; if (TempC.CompareTo('P') == 0) { char chr = (char)sr.Read(); @@ -466,7 +466,7 @@ namespace Vocaluxe.Lib.Song { c = sr.Read(); TempC = (char)c; - } while ((TempC.CompareTo('E') != 0) && !sr.EndOfStream && (c == 19 || c == 16 || c == 13)); + } while ((TempC.CompareTo('E') != 0) && !sr.EndOfStream && (c == 19 || c == 16 || c == 13 || c==10)); } foreach(CLines lines in this.Notes.Lines) {