diff options
Diffstat (limited to 'apps/pdftool.c')
-rw-r--r-- | apps/pdftool.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/pdftool.c b/apps/pdftool.c index 559eca03..3daeb777 100644 --- a/apps/pdftool.c +++ b/apps/pdftool.c @@ -83,9 +83,9 @@ void opensrc(char *filename, char *password, int loadpages) if (src->crypt) { - error = pdf_setpassword(src->crypt, password); - if (error) - die(fz_rethrow(error, "invalid password")); + int okay = pdf_setpassword(src->crypt, password); + if (!okay) + die(fz_throw("invalid password")); } if (loadpages) |