Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac21cb5a authored by Ethan Yonker's avatar Ethan Yonker Committed by Dees Troy
Browse files

Fix loading of png images in custom themes

Change-Id: I7eebc474c025eda534adb04d061795623ebecdda
parent b6ef4781
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -62,10 +62,13 @@ static int open_png(const char* name, png_structp* png_ptr, png_infop* info_ptr,
    snprintf(resPath, sizeof(resPath)-1, "/res/images/%s.png", name);
    resPath[sizeof(resPath)-1] = '\0';
    FILE* fp = fopen(resPath, "rb");
    if (fp == NULL) {
        fp = fopen(name, "rb");
        if (fp == NULL) {
            result = -1;
            goto exit;
        }
    }

    size_t bytesRead = fread(header, 1, sizeof(header), fp);
    if (bytesRead != sizeof(header)) {