summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-07-24 15:27:29 +0200
committerTor Andersson <tor.andersson@artifex.com>2014-07-24 15:27:29 +0200
commit5e1c37f13c77b3c0694085d11179a4356ab72079 (patch)
treecb939ae51fe94c506663b50f1bef09c7722496aa
parent25f7f4187a63e7c04b0b22a8c732894f94732854 (diff)
downloadmupdf-5e1c37f13c77b3c0694085d11179a4356ab72079.tar.xz
cbz: Only include each entry once, even if it matches many file suffixes.
Bug 695377.
-rw-r--r--source/cbz/mucbz.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/cbz/mucbz.c b/source/cbz/mucbz.c
index 06b1080e..f018d1c9 100644
--- a/source/cbz/mucbz.c
+++ b/source/cbz/mucbz.c
@@ -281,9 +281,16 @@ cbz_read_zip_dir_imp(cbz_document *doc, int startoffset)
doc->page = fz_malloc_array(ctx, count, sizeof(int));
for (i = 0; i < count; i++)
+ {
for (k = 0; cbz_ext_list[k]; k++)
+ {
if (strstr(doc->entry[i].name, cbz_ext_list[k]))
+ {
doc->page[doc->page_count++] = i;
+ break;
+ }
+ }
+ }
}
static void