]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fixes segfaut resulting from the use of the Completion_heads_engraver
authorMike Solomon <mike@apollinemike.com>
Tue, 19 Apr 2011 13:57:23 +0000 (09:57 -0400)
committerMike Solomon <mike@apollinemike.com>
Tue, 19 Apr 2011 13:57:23 +0000 (09:57 -0400)
This segfault was caused by using an incorrect variable to index a
vector, which wound up overshooting the end of the vector.

lily/completion-note-heads-engraver.cc

index 3002d48bb91eca7253e1bfaaa9967d5c4b000b60..2534f6992b126d9926d806a7b11513fdbc8b3aa2 100644 (file)
@@ -243,7 +243,7 @@ Completion_heads_engraver::process_music ()
          {
            Pitch *p =  unsmob_pitch (note_events_[j]->get_property ("pitch"));
            Pitch *p_last
          {
            Pitch *p =  unsmob_pitch (note_events_[j]->get_property ("pitch"));
            Pitch *p_last
-             = unsmob_pitch (tie_note_candidate_events_[j]->get_property ("pitch"));
+             = unsmob_pitch (tie_note_candidate_events_[i]->get_property ("pitch"));
            if (p && p_last && *p == *p_last)
              make_tie (tie_note_candidates_[i], notes_[j]);
          }
            if (p && p_last && *p == *p_last)
              make_tie (tie_note_candidates_[i], notes_[j]);
          }