libapse.lib: fix some version comparison errors by specifying numbers base

How to reproduce: /usr/bin/autospec -u ocre -a1,2

Errors fixed:
/usr/share/autospec/lib/libapse.lib: line 159: 019: value too great for base (error token is "019")
/usr/share/autospec/lib/libapse.lib: line 162: 019: value too great for base (error token is "019")
This commit is contained in:
Silvan Calarco 2012-11-16 18:40:20 +01:00
parent 5008e884d4
commit c5d5093431
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,10 @@
Changes in version 1.14.3
--- Nov -- 2012 Davide Madrisan <davide.madrisan(a)gmail.com>
+ bugfix
* lib/libapse.lib - Silvan Calarco:
Fix some version comparison errors by specifying numbers base.
+ bugfix
* autospec - Davide Madrisan:
Fix parsing of multi-string arguments.

View File

@ -156,10 +156,10 @@ $FUNCNAME: \`$code2' has position ${version2[$i]} in precedence"
$FUNCNAME: \`$code1' has position ${version1[$i]} in precedence"
fi
if [[ ${version2[$i]} -gt ${version1[$i]} ]]; then
if [[ 10#${version2[$i]} -gt 10#${version1[$i]} ]]; then
retval=2
break
elif [[ ${version2[$i]} -lt ${version1[$i]} ]]; then
elif [[ 10#${version2[$i]} -lt 10#${version1[$i]} ]]; then
retval=1
break
elif [ "${version2[$i]}" = "8" ]; then