Extend end when merging clusters in out-buffer
authorBehdad Esfahbod <behdad@behdad.org>
Sat, 9 Jun 2012 00:31:32 +0000 (20:31 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Sat, 9 Jun 2012 00:31:32 +0000 (20:31 -0400)
src/hb-buffer.cc

index 38eb95f..2a98497 100644 (file)
@@ -464,6 +464,10 @@ hb_buffer_t::merge_out_clusters (unsigned int start,
   while (start && out_info[start - 1].cluster == out_info[start].cluster)
     start--;
 
+  /* Extend end */
+  while (end < out_len && out_info[end - 1].cluster == out_info[end].cluster)
+    end++;
+
   for (unsigned int i = start; i < end; i++)
     out_info[i].cluster = cluster;
 }