From c9e99efc6fd81aac9cbc6c21a42a8dd0cecf93dd Mon Sep 17 00:00:00 2001 From: Scoopta Date: Mon, 27 Jul 2020 23:53:29 -0700 Subject: [PATCH] data: will now be correctly handled --- src/utils_g.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils_g.c b/src/utils_g.c index 4371bdb..7f5d065 100644 --- a/src/utils_g.c +++ b/src/utils_g.c @@ -40,6 +40,10 @@ GdkPixbuf* utils_g_pixbuf_from_base64(char* base64) { char* str = strdup(base64); char* original_str = str; + if(strncmp(str, "data:", sizeof("data:") - 1) == 0) { + str += sizeof("data:") - 1; + } + GError* err = NULL; GdkPixbufLoader* loader; if(strncmp(str, "image/", sizeof("image/") - 1) == 0) {