summaryrefslogtreecommitdiff
path: root/pango/pango-glyph-item.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/pango-glyph-item.c')
-rw-r--r--pango/pango-glyph-item.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pango/pango-glyph-item.c b/pango/pango-glyph-item.c
index 6954ed86..8c2cb4e2 100644
--- a/pango/pango-glyph-item.c
+++ b/pango/pango-glyph-item.c
@@ -315,6 +315,10 @@ pango_glyph_item_iter_next_cluster (PangoGlyphItemIter *iter)
}
iter->end_glyph = glyph_index;
+
+ g_assert (iter->start_char < iter->end_char);
+ g_assert (iter->end_char <= item->num_chars);
+
return TRUE;
}
@@ -404,6 +408,10 @@ pango_glyph_item_iter_prev_cluster (PangoGlyphItemIter *iter)
}
iter->start_glyph = glyph_index;
+
+ g_assert (iter->start_char < iter->end_char);
+ g_assert (0 <= iter->start_char);
+
return TRUE;
}