[pango/fix-breaks] Fix a problem with allow-breaks



commit bacd95e5239f5e252e7face4163779843f9efa6b
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Aug 25 09:08:34 2019 +0200

    Fix a problem with allow-breaks
    
    Fix an oversight in the calculation of log
    attributes. This was showing up as allow-breaks
    attributes being applied to the wrong ranges
    in later runs.

 pango/pango-layout.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 67db57bb..110311a8 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -4020,7 +4020,6 @@ get_items_log_attrs (const char   *text,
                      int           log_attrs_len)
 {
   int offset = 0;
-  int num_chars = 0;
   GList *l;
 
   pango_default_break (text, length, NULL, log_attrs, log_attrs_len);
@@ -4036,7 +4035,7 @@ get_items_log_attrs (const char   *text,
                           log_attrs + offset,
                           item->num_chars + 1);
 
-      offset += num_chars;
+      offset += item->num_chars;
     }
 }
 


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