diff options
-rw-r--r-- | pango/pango-glyph-item.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pango/pango-glyph-item.c b/pango/pango-glyph-item.c index 1d4ff8ea..6954ed86 100644 --- a/pango/pango-glyph-item.c +++ b/pango/pango-glyph-item.c @@ -359,8 +359,6 @@ pango_glyph_item_iter_prev_cluster (PangoGlyphItemIter *iter) cluster = glyphs->log_clusters[glyph_index - 1]; while (TRUE) { - glyph_index--; - if (glyph_index == 0) { iter->start_index = item->offset; @@ -368,6 +366,8 @@ pango_glyph_item_iter_prev_cluster (PangoGlyphItemIter *iter) break; } + glyph_index--; + if (glyphs->log_clusters[glyph_index] != cluster) { glyph_index++; @@ -383,8 +383,6 @@ pango_glyph_item_iter_prev_cluster (PangoGlyphItemIter *iter) cluster = glyphs->log_clusters[glyph_index + 1]; while (TRUE) { - glyph_index++; - if (glyph_index == glyphs->num_glyphs - 1) { iter->start_index = item->offset; @@ -392,6 +390,8 @@ pango_glyph_item_iter_prev_cluster (PangoGlyphItemIter *iter) break; } + glyph_index++; + if (glyphs->log_clusters[glyph_index] != cluster) { glyph_index--; |