From: Don Armstrong Date: Tue, 10 Jan 2017 20:43:14 +0000 (-0600) Subject: make sure stop has length too X-Git-Url: https://git.donarmstrong.com/?p=reference.git;a=commitdiff_plain;h=9c67489ca8d50da846d0cbc96ff01cb86eb9ed42 make sure stop has length too --- 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); }