summaryrefslogtreecommitdiff
path: root/pango/pango-item.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-07-17 13:11:06 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-07-17 13:11:06 -0400
commit989d86820f72e532acd9f75dc95c1ec00b47bce2 (patch)
treefc79c63f951506f9edf914c08b8e4e1342014eb0 /pango/pango-item.c
parentc3e05ce8759d9858ec14c4ade2f5987b90b42c6b (diff)
downloadpango-989d86820f72e532acd9f75dc95c1ec00b47bce2.tar.gz
Fix no-break attribute filtering
pango_attribute_equal does not compare ranges. Oops.
Diffstat (limited to 'pango/pango-item.c')
-rw-r--r--pango/pango-item.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pango/pango-item.c b/pango/pango-item.c
index d2d45aab..b43ed3a5 100644
--- a/pango/pango-item.c
+++ b/pango/pango-item.c
@@ -157,7 +157,11 @@ pango_item_split (PangoItem *orig,
static int
compare_attr (gconstpointer p1, gconstpointer p2)
{
- if (pango_attribute_equal ((PangoAttribute *)p1, (PangoAttribute *)p2))
+ const PangoAttribute *a1 = p1;
+ const PangoAttribute *a2 = p2;
+ if (pango_attribute_equal (a1, a2) &&
+ a1->start_index == a2->start_index &&
+ a1->end_index == a2->end_index)
return 0;
return 1;