aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--qpdf/qpdf.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ea3983b5..dc6e3cf6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-08-02 Jay Berkenbilt <ejb@ql.org>
+
+ * Fix off-by-one error in parsing pages options. Fixes #129.
+
2017-07-29 Jay Berkenbilt <ejb@ql.org>
* Support @filename and @- in the qpdf command-line tool to read
diff --git a/qpdf/qpdf.cc b/qpdf/qpdf.cc
index 368b9bba..5d195629 100644
--- a/qpdf/qpdf.cc
+++ b/qpdf/qpdf.cc
@@ -855,7 +855,7 @@ parse_pages_options(
{
break;
}
- if (cur_arg + 2 >= argc)
+ if (cur_arg + 1 >= argc)
{
usage("insufficient arguments to --pages");
}