summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-12-11 17:10:41 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-12-11 17:10:41 -0500
commitb412e81df3c8201952a5c48b9e81b298e1f271bb (patch)
tree39bd2992ad9f39ed1f3d1ec7afc63227392e9662
parenta0e5f9d4730323fac6845d994a59161cf3c467ce (diff)
downloadpango-b412e81df3c8201952a5c48b9e81b298e1f271bb.tar.gz
Fix pango-view option handlingfix-pango-view-options
The --serialized option did not quite work as expected.
-rw-r--r--utils/viewer-render.c6
1 files 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);