]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
small conda startswith improvement 392/head
authorWolf Vollprecht <w.vollprecht@gmail.com>
Wed, 1 Jul 2020 09:15:24 +0000 (11:15 +0200)
committerWolf Vollprecht <w.vollprecht@gmail.com>
Wed, 1 Jul 2020 10:01:13 +0000 (12:01 +0200)
src/conda.c

index 7f2538a9feb42191ba35539fc35e91e97b4df1a8..21ad6bfbeadbe0718ce81cbb303fe399dbb5aa2a 100644 (file)
@@ -212,7 +212,7 @@ pool_evrcmp_conda_int(const char *evr1, const char *evr1e, const char *evr2, con
   r = solv_vercmp_conda(evr1, r1 ? r1 : s1, evr2, r2 ? r2 : s2, r2 ? 0 : startswith);
   if (r)
     return r;
-  if (!r1 && !r2)
+  if ((!r2 && startswith) || (!r1 && !r2))
     return 0;
   if (!r1 && r2)
     return -1;