diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-06-28 13:15:43 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-07-05 02:28:39 +0800 |
commit | 653e62cf843fa04c9bc358130daab0285eb21fe6 (patch) | |
tree | 36643115b0b0f4034b4bacd7fc2a3c5e13b9b070 | |
parent | 502e56243e3bf70d95b85f67639001b26fdb1528 (diff) | |
download | mupdf-653e62cf843fa04c9bc358130daab0285eb21fe6.tar.xz |
cbz: Use case insensitive comparison for extension.
-rw-r--r-- | source/cbz/mucbz.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/cbz/mucbz.c b/source/cbz/mucbz.c index 91918f57..74b96268 100644 --- a/source/cbz/mucbz.c +++ b/source/cbz/mucbz.c @@ -7,7 +7,6 @@ typedef struct cbz_page_s cbz_page; static const char *cbz_ext_list[] = { ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tif", ".tiff", - ".JPG", ".JPEG", ".PNG", ".GIF", ".BMP", ".TIF", ".TIFF", NULL }; @@ -89,7 +88,8 @@ cbz_create_page_list(fz_context *ctx, cbz_document *doc) for (k = 0; cbz_ext_list[k]; k++) { const char *name = fz_list_archive_entry(ctx, zip, i); - if (strstr(name, cbz_ext_list[k])) + const char *ext = name ? strrchr(name, '.') : NULL; + if (ext && !fz_strcasecmp(ext, cbz_ext_list[k])) { doc->page[doc->page_count++] = name; break; |