diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2015-09-01 13:31:32 +0100 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2015-09-01 13:33:51 +0100 |
commit | 40a96ff4cb86ebcd7a9025ed73b5c754a9d314c8 (patch) | |
tree | bccb11e899dc01ae4d31db9800096f456a791f21 /pango/pango-glyph-item.c | |
parent | d1326d373687d034467d1d1d547f2977b967d349 (diff) | |
download | pango-40a96ff4cb86ebcd7a9025ed73b5c754a9d314c8.tar.gz |
Add assertion to glyph-item-iter
Part of https://bugzilla.gnome.org/show_bug.cgi?id=541608
Diffstat (limited to 'pango/pango-glyph-item.c')
-rw-r--r-- | pango/pango-glyph-item.c | 8 |
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; } |