diff options
author | Francois Pons <fpons@mandriva.com> | 2001-04-14 14:25:28 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-04-14 14:25:28 +0000 |
commit | 45146b38ee32999a1e73286d57ad27588bf4026f (patch) | |
tree | f1b76318305318e3533d21227a963c52dee0f3bf | |
parent | 607b22c6679ee2d80d4131a6be8954c32e11be7c (diff) | |
download | drakx-backup-do-not-use-45146b38ee32999a1e73286d57ad27588bf4026f.tar drakx-backup-do-not-use-45146b38ee32999a1e73286d57ad27588bf4026f.tar.gz drakx-backup-do-not-use-45146b38ee32999a1e73286d57ad27588bf4026f.tar.bz2 drakx-backup-do-not-use-45146b38ee32999a1e73286d57ad27588bf4026f.tar.xz drakx-backup-do-not-use-45146b38ee32999a1e73286d57ad27588bf4026f.zip |
fixed absurd mismatch of use of <=> and cmp on versionCompare.
-rw-r--r-- | perl-install/pkgs.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 3d143c8d7..ff6d0a0ad 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -864,7 +864,7 @@ sub versionCompare($$) { 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 $_; + $_ = length($sa) <=> length($sb) || $sa cmp $sb and return $_; $sa eq '' && $sb eq '' and return $a cmp $b || 0; } } |