diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-12-11 17:10:41 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-12-11 17:10:41 -0500 |
commit | b412e81df3c8201952a5c48b9e81b298e1f271bb (patch) | |
tree | 39bd2992ad9f39ed1f3d1ec7afc63227392e9662 | |
parent | a0e5f9d4730323fac6845d994a59161cf3c467ce (diff) | |
download | pango-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.c | 6 |
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); |