X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=lib%2FDeb%2FVersions.pm;h=366af76bccca359450606767630c77936c52f4ba;hb=49052885778c856da9b93a5f2f9e8877a827c3c5;hp=4f3b3207b0d8130d92706e181daf62884574000a;hpb=bcfcaa38f5df98ccff82e7ec1b9473b92b850c17;p=deb%2Fpackages.git diff --git a/lib/Deb/Versions.pm b/lib/Deb/Versions.pm index 4f3b320..366af76 100644 --- a/lib/Deb/Versions.pm +++ b/lib/Deb/Versions.pm @@ -111,7 +111,7 @@ sub _cmp_part { my ( $v1, $v2 ) = @_; my $r; - while ( $v1 && $v2 ) { + while ( $v1 || $v2 ) { $v1 =~ s/^(\D*)//o; my $sp1 = $1; $v2 =~ s/^(\D*)//o; @@ -138,8 +138,8 @@ sub _cmp_part { sub _lcmp { my ( $v1, $v2 ) = @_; - - for ( my $i = 0; $i < length( $v1 ); $i++ ) { + + for ( my $i = 0; $i <= length( $v1 ); $i++ ) { my ( $n1, $n2 ) = ( ord( substr( $v1, $i, 1 ) ), ord( substr( $v2, $i, 1 ) ) ); $n1 += 256 if $n1 < 65; # letters sort earlier than non-letters @@ -154,7 +154,7 @@ sub _lcmp { } our @SUITES_SORT = qw( woody oldstable sarge stable stable-proposed-updates - etch testing testing-proposed-updates sid unstable + etch etch-m68k testing testing-proposed-updates sid unstable experimental warty hoary hoary-backports breezy breezy-backports dapper ); our @ARCHIVE_SORT = qw( non-US security updates volatile backports );