forked from ungleich-public/cdist
[__sensible_editor] Use int comparisons in version_ge
This commit is contained in:
parent
9edf5e8fe0
commit
365974c447
1 changed files with 3 additions and 2 deletions
|
@ -27,8 +27,9 @@ version_ge() {
|
|||
nx = split($1, x, ".");
|
||||
ny = split(target, y, ".");
|
||||
for (i = 1; i <= max(nx, ny); ++i) {
|
||||
if (x[i] < y[i]) exit 1;
|
||||
else if (x[i] > y[i]) exit 0;
|
||||
diff = int(x[i]) - int(y[i]);
|
||||
if (diff < 0) exit 1;
|
||||
else if (diff > 0) exit 0;
|
||||
else continue;
|
||||
}
|
||||
}'
|
||||
|
|
Loading…
Reference in a new issue