[__sensible_editor] Use int comparisons in version_ge

This commit is contained in:
Dennis Camera 2019-10-13 13:42:15 +02:00
parent 9edf5e8fe0
commit 365974c447

View file

@ -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;
}
}'