summaryrefslogtreecommitdiff
path: root/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-min_max.patch
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-min_max.patch')
-rw-r--r--media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-min_max.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-min_max.patch b/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-min_max.patch
new file mode 100644
index 000000000000..5724bc16a188
--- /dev/null
+++ b/media-gfx/gscan2pdf/files/gscan2pdf-2.13.2-min_max.patch
@@ -0,0 +1,20 @@
+--- a/lib/Gscan2pdf/Dialog/Scan/Image_Sane.pm
++++ b/lib/Gscan2pdf/Dialog/Scan/Image_Sane.pm
+@@ -295,6 +295,17 @@ sub _initialise_options { ## no critic (ProhibitExcessComplexity)
+ if ( $opt->{constraint}{quant} ) {
+ $step = $opt->{constraint}{quant};
+ }
++ if ( $opt->{constraint}{min} > $opt->{constraint}{max} ) {
++ $logger->error(
++ sprintf __(
++"Ignoring scan option '%s', minimum range (%s) > maximum (%s)"
++ ),
++ $opt->{name},
++ $opt->{constraint}{min},
++ $opt->{constraint}{max}
++ );
++ next;
++ }
+ $widget =
+ Gtk3::SpinButton->new_with_range( $opt->{constraint}{min},
+ $opt->{constraint}{max}, $step );