From cef6ffe832833828c044373b7bac83ce20f272ad Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Thu, 23 Nov 2000 18:11:22 +0000 Subject: fixed deadlock in some case on version_compare. --- rpmtools.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rpmtools.pm') 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 $_; } } -- cgit v1.2.1