]> git.donarmstrong.com Git - reference.git/commitdiff
make sure stop has length too
authorDon Armstrong <don@donarmstrong.com>
Tue, 10 Jan 2017 20:43:14 +0000 (14:43 -0600)
committerDon Armstrong <don@donarmstrong.com>
Tue, 10 Jan 2017 20:43:14 +0000 (14:43 -0600)
lib/Reference/Retrieve/PubMed.pm

index d1de4e9c20a68ec1d7c275f3e348edcc8674bb09..9c477756bac22d47c7304ffa7889d461674b6bc8 100644 (file)
@@ -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);
      }