From 688051cb21d6748bc908009b5c012e0ef93d1ae6 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 18 Dec 2018 20:22:40 +0100 Subject: [PATCH] autoupdater: fix regression in version compare Version strings with the same prefix, e.g. "1.0" and "1.0~pre", or even "1.0" and "1.0.1" were considered equal. This is a regression in the C autoupdater rewrite. --- admin/autoupdater/src/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/autoupdater/src/version.c b/admin/autoupdater/src/version.c index dd4d3ff..f1967e7 100644 --- a/admin/autoupdater/src/version.c +++ b/admin/autoupdater/src/version.c @@ -47,7 +47,7 @@ bool newer_than(const char *a, const char *b) { if (b == NULL) return true; - while (*a != '\0' && *b != '\0') { + while (*a != '\0' || *b != '\0') { int first_diff = 0; // compare non-digits character by character