[pango: 2/8] Fix no-break attribute filtering



commit 989d86820f72e532acd9f75dc95c1ec00b47bce2
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jul 17 13:11:06 2019 -0400

    Fix no-break attribute filtering
    
    pango_attribute_equal does not compare ranges. Oops.

 pango/pango-item.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]