[pango/fix-pango-view-options] Fix pango-view option handling




commit b412e81df3c8201952a5c48b9e81b298e1f271bb
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Dec 11 17:10:41 2021 -0500

    Fix pango-view option handling
    
    The --serialized option did not quite
    work as expected.

 utils/viewer-render.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/utils/viewer-render.c b/utils/viewer-render.c
index 3217d80f..0aee39a6 100644
--- a/utils/viewer-render.c
+++ b/utils/viewer-render.c
@@ -107,14 +107,14 @@ make_layout(PangoContext *context,
 
   if (opt_serialized)
     {
-      char *text;
+      char *data;
       gsize len;
       GBytes *bytes;
       GError *error = NULL;
 
-      if (!g_file_get_contents (file_arg, &text, &len, &error))
+      if (!g_file_get_contents (file_arg, &data, &len, &error))
         fail ("%s\n", error->message);
-      bytes = g_bytes_new_take (text, size);
+      bytes = g_bytes_new_take (data, len);
       layout = pango_layout_deserialize (context, bytes, PANGO_LAYOUT_DESERIALIZE_CONTEXT, &error);
       if (!layout)
         fail ("%s\n", error->message);


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