summaryrefslogtreecommitdiff
path: root/gfx/pdftoc.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-22 23:20:58 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-22 23:20:58 -0300
commit17d681872b7503c689ba12b4b62f54bd0e0569a7 (patch)
treeac395a1b11b97eae193a3850512d07ec0f0655df /gfx/pdftoc.c
parent15af44aef6076907cf04ae27cb850f49f3b70ed7 (diff)
downloadeeshow-17d681872b7503c689ba12b4b62f54bd0e0569a7.tar.gz
eeshow-17d681872b7503c689ba12b4b62f54bd0e0569a7.tar.bz2
eeshow-17d681872b7503c689ba12b4b62f54bd0e0569a7.zip
eeshow/gfx/pdftoc.c (line): don't be fooled by "/Type /Pages"
We really ought to test properly for end-of-word, not rely on prefixes.
Diffstat (limited to 'gfx/pdftoc.c')
-rw-r--r--gfx/pdftoc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gfx/pdftoc.c b/gfx/pdftoc.c
index dae3790..dd30ded 100644
--- a/gfx/pdftoc.c
+++ b/gfx/pdftoc.c
@@ -153,7 +153,8 @@ static void line(struct pdftoc *ctx, const char *s)
ctx->state = idle;
break;
}
- if (strbegins(s, "<< /Type /Page")) {
+ if (strbegins(s, "<< /Type /Page") &&
+ !strbegins(s, "<< /Type /Pages")) {
ctx->curr_obj->is_page = 1;
break;
}