sc: substitute 0 values by dash
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 22 Jun 2015 08:58:50 +0000 (10:58 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 22 Jun 2015 13:38:51 +0000 (15:38 +0200)
sc.plp

diff --git a/sc.plp b/sc.plp
index f134226f3ac8aaa8b53c22cfea45e7491cf1a588..ec79a7c310550e7d4bdd040673fe95500bd8ceb5 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -115,7 +115,7 @@ sub showrange {
        my ($min, $max) = @_;
        return '' if not defined $min;
        $_ &&= int($_ + .5) for $min, $max;  # round halves up
-       return $min if not defined $max or $min == $max;
+       return $min || '-' if not defined $max or $min == $max;
        return "$min-$max";
 }