From f0f83328273fdb9b0f4d73ba980354f197ef2deb Mon Sep 17 00:00:00 2001 From: Sweets Date: Thu, 22 Jul 2021 18:27:11 -0700 Subject: [PATCH] Get base64 at least displaying (#27) --- src/notification.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/notification.c b/src/notification.c index 68521c0..a4b6500 100644 --- a/src/notification.c +++ b/src/notification.c @@ -130,11 +130,11 @@ static void create_csv_hint_string(GVariant *hints, char **string_ptr) { free(temp); } - } else if (g_variant_lookup_value(hints, key, image_type)) { + } else if ((value = g_variant_lookup_value(hints, key, image_type))) { g_variant_get(value, "(iiibii@ay)", &width, &height, &row_stride, &alpha_bool, &bits_per_sample, &channels, &pixel_data); pixel_stride = (channels * bits_per_sample + 7) / 8; - expected_length = (height - 1) * (width + row_stride) * + expected_length = (height - 1) * row_stride + width * pixel_stride; pixels = g_variant_get_fixed_array(pixel_data, &real_length,