From: Michael Tremer Date: Tue, 7 Dec 2021 16:44:44 +0000 (+0000) Subject: util: Correctly find the first part before =, >, <, etc. X-Git-Tag: 0.9.28~863 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6421959d7aeefac0b5023f79739d94dca7d45972;p=pakfire.git util: Correctly find the first part before =, >, <, etc. Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/util.c b/src/libpakfire/util.c index b777069df..a348c13b7 100644 --- a/src/libpakfire/util.c +++ b/src/libpakfire/util.c @@ -159,7 +159,13 @@ static Id pakfire_parse_dep(struct pakfire* pakfire, const char** s) { p++; // Find the first part - size_t l = skip(&p, &n); + n = p; + + // Find the first part (before =, >= or <=) + while (*p && !isspace(*p) && *p != '<' && *p != '=' && *p != '>') + p++; + + size_t l = p - n; // Add name to pool if (pakfire_string_startswith(n, "pakfire("))