about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/string/strverscmp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/string/strverscmp.c b/src/string/strverscmp.c
index 33a42eed..94d2e15c 100644
--- a/src/string/strverscmp.c
+++ b/src/string/strverscmp.c
@@ -31,8 +31,10 @@ int strverscmp(const char *l, const char *r)
 		while (isdigit(r[lenr]) ) lenr++;
 		if (lenl==lenr) {
 			return (*l -  *r);
+		} else if (lenl>lenr) {
+			return 1;
 		} else {
-			return (lenl - lenr);
+			return -1;
 		}
 	} else {
 		return (*l -  *r);