diff options
-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; |