[pango/better-hyphens: 38/41] glyph iter: Relax assertions
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/better-hyphens: 38/41] glyph iter: Relax assertions
- Date: Wed, 17 Jul 2019 01:07:23 +0000 (UTC)
commit 371e31133a41b1f660fe4397adddea904c3ca5d3
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jul 15 23:12:53 2019 -0400
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]