[pango/more-test-coverage2: 9/15] layout: Zero out log attrs




commit 66ad8cb94a8ce2a53a615c66f1894dfe58b6064d
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jul 6 07:20:01 2021 -0400

    layout: Zero out log attrs
    
    This makes tests more reproducible.

 pango/pango-layout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index ae2745b0..0227f819 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -4309,7 +4309,7 @@ pango_layout_check_lines (PangoLayout *layout)
       itemize_attrs = NULL;
     }
 
-  layout->log_attrs = g_new (PangoLogAttr, layout->n_chars + 1);
+  layout->log_attrs = g_new0 (PangoLogAttr, layout->n_chars + 1);
 
   start_offset = 0;
   start = layout->text;


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