From dab747094cec22f47316ba749d4910b1f4280ba4 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 15 Jul 2019 23:12:53 -0400 Subject: glyph iter: Relax assertions Now that we are inserting glyphs out of thin air, we can end up with clusters that have start_char == end_char. Allowing that does not obviously cause any issues. --- 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; -- cgit v1.2.1