aboutsummaryrefslogtreecommitdiffstats
path: root/rpmtools.pm
diff options
context:
space:
mode:
Diffstat (limited to 'rpmtools.pm')
-rw-r--r--rpmtools.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpmtools.pm b/rpmtools.pm
index 6805fd0..b7b7184 100644
--- a/rpmtools.pm
+++ b/rpmtools.pm
@@ -399,7 +399,7 @@ sub version_compare {
local $_;
while ($a || $b) {
- my ($sb, $sa) = map { $1 if $a =~ /^\W*\d/ ? s/^\W*0*(\d+)// : s/^\W*(\D+)// } ($b, $a);
+ my ($sb, $sa) = map { $1 if ($a || 0) =~ /^\W*\d/ ? s/^\W*0*(\d+)// : s/^\W*(\D+)// } ($b, $a);
$_ = length($sa) cmp length($sb) || $sa cmp $sb and return $_;
}
}