From 909201cf5d57bd0bbfe306a4b08aa0c70f0ba57a Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Sun, 9 Dec 2007 22:54:26 +0000 Subject: [PATCH] Fix empty last ending --- Sources/VLModel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/VLModel.cpp b/Sources/VLModel.cpp index f6ffa7e..13110e5 100644 --- a/Sources/VLModel.cpp +++ b/Sources/VLModel.cpp @@ -1127,7 +1127,9 @@ size_t VLSong::EmptyEnding() const { size_t full = fMeasures.size(); - while (full-- && fMeasures[full].IsEmpty()) + while (full-- && fMeasures[full].IsEmpty() + && !DoesEndRepeat(full+1, 0) && !DoesEndEnding(full+1, 0, 0) + ) ; return fMeasures.size()-(full+1);