summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorPaul Gardiner <paulg.artifex@glidos.net>2012-08-29 10:58:09 +0100
committerPaul Gardiner <paulg.artifex@glidos.net>2012-08-29 10:58:09 +0100
commit6a5b8879b3b3b2a9ef085f38c1758d62456b921b (patch)
treef45fc1a9f32dcd31f335d27fffba75e4ceb9a23c /apps
parentd85ad485bb64508bc59cfd4977cb5a37cf882070 (diff)
parent25552e9f2ec3f17a0ce1cbd8d7818170d132959a (diff)
downloadmupdf-6a5b8879b3b3b2a9ef085f38c1758d62456b921b.tar.xz
Merge branch 'master' into forms
Conflicts: cbz/mucbz.c pdf/pdf_parse.c pdf/pdf_form.c xps/xps_zip.c
Diffstat (limited to 'apps')
-rw-r--r--apps/mupdfinfo.c2
-rw-r--r--apps/pdfapp.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/mupdfinfo.c b/apps/mupdfinfo.c
index 279298c2..6c0a31d7 100644
--- a/apps/mupdfinfo.c
+++ b/apps/mupdfinfo.c
@@ -901,7 +901,7 @@ showinfo(char *filename, int show, char *pagelist)
pagecount = pdf_count_pages(xref);
spec = fz_strsep(&pagelist, ",");
- while (spec)
+ while (spec && pagecount)
{
dash = strchr(spec, '-');
diff --git a/apps/pdfapp.c b/apps/pdfapp.c
index d4d292da..b95b4178 100644
--- a/apps/pdfapp.c
+++ b/apps/pdfapp.c
@@ -42,7 +42,7 @@ static void pdfapp_error(pdfapp_t *app, char *msg)
char *pdfapp_version(pdfapp_t *app)
{
return
- "MuPDF 1.0\n"
+ "MuPDF 1.1\n"
"Copyright 2006-2012 Artifex Software, Inc.\n";
}
@@ -117,7 +117,7 @@ void pdfapp_open(pdfapp_t *app, char *filename, int reload)
{
password = winpassword(app, filename);
if (!password)
- pdfapp_error(app, "Needs a password.");
+ fz_throw(ctx, "Needs a password");
okay = fz_authenticate_password(app->doc, password);
if (!okay)
pdfapp_warn(app, "Invalid password.");