diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-07-15 23:12:53 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-07-16 21:20:32 -0400 |
commit | dab747094cec22f47316ba749d4910b1f4280ba4 (patch) | |
tree | bcb60490fe51f5204f459566083a716732a74e29 | |
parent | 1a3c234802eb28b3080d78ed8e6f483f445c5a17 (diff) | |
download | pango-dab747094cec22f47316ba749d4910b1f4280ba4.tar.gz |
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.
-rw-r--r-- | pango/pango-glyph-item.c | 4 |
1 files 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; |