portability.eclass: avoid lexicographic number comparison, bug #705250
authorSergei Trofimovich <slyfox@gentoo.org>
Tue, 18 Feb 2020 14:30:43 +0000 (14:30 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Tue, 18 Feb 2020 14:31:45 +0000 (14:31 +0000)
Closes: https://bugs.gentoo.org/705250
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
eclass/portability.eclass

index c56f03fb8763c582ea83f84bb0bb23bd984ee52e..1402c0420cb0c6b16a58f94ea7c9901f04c557b8 100644 (file)
@@ -67,8 +67,8 @@ seq() {
 
        # Screw it, do the output ourselves
        while :; do
-               [[ $max < $min && $step > 0 ]] && break
-               [[ $min < $max && $step < 0 ]] && break
+               [[ $max -lt $min && $step -gt 0 ]] && break
+               [[ $min -lt $max && $step -gt 0 ]] && break
                echo $min
                : $(( min += step ))
        done