Skip to content

Commit

Permalink
fix: bad bar at start of line when repeat bar and annotation/deco
Browse files Browse the repository at this point in the history
Issue #13
  • Loading branch information
moinejf committed Dec 6, 2017
1 parent 379d406 commit ef9a848
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions music.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ef9a848

Please sign in to comment.