diff options
author | Francois Pons <fpons@mandriva.com> | 2001-04-14 14:23:46 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-04-14 14:23:46 +0000 |
commit | 36c52b49732390c13e0cd173ce626fdc62a6ac46 (patch) | |
tree | 7b57328a84fa378ed9494c57cc1f817088ed5c60 | |
parent | 11c900e151a0894282d9c5ff8108e1644d7c6474 (diff) | |
download | rpmtools-36c52b49732390c13e0cd173ce626fdc62a6ac46.tar rpmtools-36c52b49732390c13e0cd173ce626fdc62a6ac46.tar.gz rpmtools-36c52b49732390c13e0cd173ce626fdc62a6ac46.tar.bz2 rpmtools-36c52b49732390c13e0cd173ce626fdc62a6ac46.tar.xz rpmtools-36c52b49732390c13e0cd173ce626fdc62a6ac46.zip |
fixed absurd mismatch of use <=> and cmp.
-rw-r--r-- | rpmtools.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rpmtools.pm b/rpmtools.pm index aa706c4..2e70cc4 100644 --- a/rpmtools.pm +++ b/rpmtools.pm @@ -539,7 +539,7 @@ sub version_compare { while ($a || $b) { my ($sb, $sa) = map { $1 if $a =~ /^\W*\d/ ? s/^\W*0*(\d+)// : s/^\W*(\D*)// } ($b, $a); - $_ = length($sa) cmp length($sb) || $sa cmp $sb and return $_ || 0; + $_ = length($sa) <=> length($sb) || $sa cmp $sb and return $_ || 0; $sa eq '' && $sb eq '' and return $a cmp $b || 0; } 0; |