2006-11-22  Behdad Esfahbod  <behdad@gnome.org>

        Bug 377975 – bug in _pango_glyph_item_iter_next_cluster

        * pango/pango-glyph-item.c (_pango_glyph_item_iter_next_cluster),
        (_pango_glyph_item_iter_prev_cluster): Fix condition for ending a
        cluster.

Index: pango/pango-glyph-item.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pango-glyph-item.c,v
retrieving revision 1.15
diff -u -p -d -r1.15 pango-glyph-item.c
--- pango/pango-glyph-item.c	21 Nov 2006 23:24:41 -0000	1.15
+++ pango/pango-glyph-item.c	22 Nov 2006 20:34:35 -0000
@@ -193,7 +193,7 @@ _pango_glyph_item_iter_next_cluster (Pan
 	      break;
 	    }
 	  
-	  if (item->offset + glyphs->log_clusters[glyph_index] >= iter->start_index)
+	  if (item->offset + glyphs->log_clusters[glyph_index] != iter->start_index)
 	    {
 	      iter->end_index = item->offset + glyphs->log_clusters[glyph_index];
 	      iter->end_char += g_utf8_strlen (iter->text + iter->start_index,
@@ -215,7 +215,7 @@ _pango_glyph_item_iter_next_cluster (Pan
 	      break;
 	    }
 	  
-	  if (item->offset + glyphs->log_clusters[glyph_index] >= iter->start_index)
+	  if (item->offset + glyphs->log_clusters[glyph_index] != iter->start_index)
 	    {
 	      iter->end_index = item->offset + glyphs->log_clusters[glyph_index];
 	      iter->end_char += g_utf8_strlen (iter->text + iter->start_index,
@@ -274,7 +274,7 @@ _pango_glyph_item_iter_prev_cluster (Pan
 	      break;
 	    }
 	  
-	  if (item->offset + glyphs->log_clusters[glyph_index] < iter->end_index)
+	  if (item->offset + glyphs->log_clusters[glyph_index] != iter->end_index)
 	    {
 	      iter->start_index = item->offset + glyphs->log_clusters[glyph_index];
 	      iter->start_char -= g_utf8_strlen (iter->text + iter->start_index,
@@ -296,7 +296,7 @@ _pango_glyph_item_iter_prev_cluster (Pan
 	      break;
 	    }
 	  
-	  if (item->offset + glyphs->log_clusters[glyph_index] < iter->start_index)
+	  if (item->offset + glyphs->log_clusters[glyph_index] != iter->start_index)
 	    {
 	      iter->start_index = item->offset + glyphs->log_clusters[glyph_index];
 	      iter->start_char -= g_utf8_strlen (iter->text + iter->start_index,

