From ef9a848694f77fda0ff0ddeb549ea7e8813ead0e Mon Sep 17 00:00:00 2001 From: Jean-Francois Moine Date: Wed, 6 Dec 2017 10:49:31 +0100 Subject: [PATCH] fix: bad bar at start of line when repeat bar and annotation/deco Issue #13 --- music.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/music.c b/music.c index 5f483fa..e8bfd67 100644 --- a/music.c +++ b/music.c @@ -3314,23 +3314,24 @@ static void init_music_line(void) for (p_voice = first_voice; p_voice; p_voice = p_voice->next) { int bar_start; + // if bar already, keep it in sequence + voice = p_voice - voice_tb; + if (last_s->voice == voice && last_s->type == BAR) { + p_voice->last_sym = last_s; + last_s = last_s->ts_next; + continue; + } + bar_start = p_voice->bar_start; if (!bar_start) continue; p_voice->bar_start = 0; - voice = p_voice - voice_tb; if (cursys->voice[voice].range < 0 || cursys->voice[voice].second || cursys->staff[cursys->voice[voice].staff].empty) continue; - // if bar already, ignore - if (last_s->voice == voice && last_s->type == BAR) { - p_voice->last_sym = last_s; - last_s = last_s->ts_next; - continue; - } s = sym_new(BAR, p_voice, last_s); s->u.bar.type = bar_start & 0x0fff; if (bar_start & 0x8000)