]> git.donarmstrong.com Git - reference.git/blobdiff - lib/Reference/Retrieve/PubMed.pm
make sure stop has length too
[reference.git] / 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);
      }