aboutsummaryrefslogtreecommitdiffstats
path: root/rpmtools.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-11-23 18:11:22 +0000
committerFrancois Pons <fpons@mandriva.com>2000-11-23 18:11:22 +0000
commitcef6ffe832833828c044373b7bac83ce20f272ad (patch)
tree55bb8494910dd9fc6fe4eaf5be7b74973a3c0978 /rpmtools.pm
parentae86a0f5c400c85a104b8959809e9dab9069b2d0 (diff)
downloadrpmtools-cef6ffe832833828c044373b7bac83ce20f272ad.tar
rpmtools-cef6ffe832833828c044373b7bac83ce20f272ad.tar.gz
rpmtools-cef6ffe832833828c044373b7bac83ce20f272ad.tar.bz2
rpmtools-cef6ffe832833828c044373b7bac83ce20f272ad.tar.xz
rpmtools-cef6ffe832833828c044373b7bac83ce20f272ad.zip
fixed deadlock in some case on version_compare.
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 $_;
}
}