]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/beaming-pattern.cc
fix midi lengths for drum notes too.
[lilypond.git] / lily / beaming-pattern.cc
index 092c6b673d39f9509b87d997961796553e82c6fd..542ce8e455c61f6191a48c7a4d040948abd61285 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1999--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1999--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "beaming-pattern.hh"
@@ -159,13 +159,13 @@ Beaming_pattern::beamify (Context *context)
   vsize k = 0;
   for (vsize i = 0; i  < infos_.size(); i++)
     {
-      while (j < group_starts.size() - 1
+      while (j + 1 < group_starts.size()
             && group_starts[j+1] <= infos_[i].start_moment_)
        j++;
 
       infos_[i].group_start_ = group_starts[j];
       infos_[i].beat_length_ = beat_length;  
-      while (k < beat_starts.size() - 1
+      while (k + 1 < beat_starts.size() 
             && beat_starts[k+1] <= infos_[i].start_moment_)
        k++;