From 365974c4471e0df503d771e9b0d604a8f1883af8 Mon Sep 17 00:00:00 2001
From: Dennis Camera <dennis.camera@ssrq-sds-fds.ch>
Date: Sun, 13 Oct 2019 13:42:15 +0200
Subject: [PATCH] [__sensible_editor] Use int comparisons in version_ge

---
 cdist/conf/type/__sensible_editor/manifest | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cdist/conf/type/__sensible_editor/manifest b/cdist/conf/type/__sensible_editor/manifest
index 43344dac..3a1926b6 100644
--- a/cdist/conf/type/__sensible_editor/manifest
+++ b/cdist/conf/type/__sensible_editor/manifest
@@ -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;
 		}
 	}'