From 9c67489ca8d50da846d0cbc96ff01cb86eb9ed42 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 10 Jan 2017 14:43:14 -0600 Subject: [PATCH] make sure stop has length too --- lib/Reference/Retrieve/PubMed.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Reference/Retrieve/PubMed.pm b/lib/Reference/Retrieve/PubMed.pm index d1de4e9..9c47775 100644 --- a/lib/Reference/Retrieve/PubMed.pm +++ b/lib/Reference/Retrieve/PubMed.pm @@ -423,7 +423,7 @@ sub _fix_medline_pages($){ if (not defined $start) { ($start) = $pagination =~ /(\d+)/ } - if ($start > $stop and defined $stop) { + if ($start > $stop and defined $stop and length($stop)) { # this must be a reduced page listing; fix it up $stop+=$start - $start % 10 ** (int(log($stop)/log(10))+1); } -- 2.39.2