[pango] glyph iter: Adjust assertions



commit 7bde0af1218a6729ac475b70a8eb571d6c1b5da5
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jul 17 19:29:55 2019 -0400

    glyph iter: Adjust assertions
    
    With the inserted hyphens we end up in a situation
    where we have start_char == end_char at the end
    of an item. It seems to be otherwise harmless.

 pango/pango-glyph-item.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pango/pango-glyph-item.c b/pango/pango-glyph-item.c
index 586b23ba..eb880608 100644
--- a/pango/pango-glyph-item.c
+++ b/pango/pango-glyph-item.c
@@ -316,7 +316,7 @@ pango_glyph_item_iter_next_cluster (PangoGlyphItemIter *iter)
 
   iter->end_glyph = glyph_index;
 
-  g_assert (iter->start_char < iter->end_char);
+  g_assert (iter->start_char <= iter->end_char);
   g_assert (iter->end_char <= item->num_chars);
 
   return TRUE;
@@ -409,7 +409,7 @@ pango_glyph_item_iter_prev_cluster (PangoGlyphItemIter *iter)
 
   iter->start_glyph = glyph_index;
 
-  g_assert (iter->start_char < iter->end_char);
+  g_assert (iter->start_char <= iter->end_char);
   g_assert (0 <= iter->start_char);
 
   return TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]