data: will now be correctly handled
This commit is contained in:
parent
592e427133
commit
c9e99efc6f
@ -40,6 +40,10 @@ GdkPixbuf* utils_g_pixbuf_from_base64(char* base64) {
|
|||||||
char* str = strdup(base64);
|
char* str = strdup(base64);
|
||||||
char* original_str = str;
|
char* original_str = str;
|
||||||
|
|
||||||
|
if(strncmp(str, "data:", sizeof("data:") - 1) == 0) {
|
||||||
|
str += sizeof("data:") - 1;
|
||||||
|
}
|
||||||
|
|
||||||
GError* err = NULL;
|
GError* err = NULL;
|
||||||
GdkPixbufLoader* loader;
|
GdkPixbufLoader* loader;
|
||||||
if(strncmp(str, "image/", sizeof("image/") - 1) == 0) {
|
if(strncmp(str, "image/", sizeof("image/") - 1) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user