summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2020-02-22 01:00:05 +0100
committerAlbert Astals Cid <tsdgeos@yahoo.es>2020-02-25 21:06:32 +0000
commitafa0528e1dfaafeb09ad9fb52902b13b378e0250 (patch)
tree697a546f31e2414e1162f61c439b43995cb0a3cb
parent90a1441809fc6ca8713022bf8cb5530e9a7ae832 (diff)
pdftoppm/pdftocairo: Fix more odd/even mismatch
-rw-r--r--utils/pdftocairo.cc4
-rw-r--r--utils/pdftoppm.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/utils/pdftocairo.cc b/utils/pdftocairo.cc
index db12a421..e6e282a5 100644
--- a/utils/pdftocairo.cc
+++ b/utils/pdftocairo.cc
@@ -1175,8 +1175,8 @@ int main(int argc, char *argv[]) {
// outputting a single page, ensure that even/odd page selection doesn't
// filter out that single page.
if (firstPage == lastPage &&
- ((printOnlyEven && firstPage % 2 == 0) ||
- (printOnlyOdd && firstPage % 2 == 1))) {
+ ((printOnlyEven && firstPage % 2 == 1) ||
+ (printOnlyOdd && firstPage % 2 == 0))) {
fprintf(stderr, "Invalid even/odd page selection, no pages match criteria.\n");
exit(99);
}
diff --git a/utils/pdftoppm.cc b/utils/pdftoppm.cc
index fb5a363a..7605276d 100644
--- a/utils/pdftoppm.cc
+++ b/utils/pdftoppm.cc
@@ -532,8 +532,8 @@ int main(int argc, char *argv[]) {
// outputting a single page, ensure that even/odd page selection doesn't
// filter out that single page.
if (firstPage == lastPage &&
- ((printOnlyEven && firstPage % 2 == 0) ||
- (printOnlyOdd && firstPage % 2 == 1))) {
+ ((printOnlyEven && firstPage % 2 == 1) ||
+ (printOnlyOdd && firstPage % 2 == 0))) {
fprintf(stderr, "Invalid even/odd page selection, no pages match criteria.\n");
goto err1;
}