From: Michael Schroeder Date: Wed, 17 Apr 2019 09:55:51 +0000 (+0200) Subject: repo_conda: Fix type check of build_number X-Git-Tag: 0.7.5~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13228c79079eb54471a995276e3f7c59827c3875;p=thirdparty%2Flibsolv.git repo_conda: Fix type check of build_number It's a number, not a string. Problem spotted by Wolf Vollprecht, thanks! --- diff --git a/ext/repo_conda.c b/ext/repo_conda.c index 4f76c8f7..0828aff6 100644 --- a/ext/repo_conda.c +++ b/ext/repo_conda.c @@ -58,7 +58,7 @@ parse_package(struct parsedata *pd, struct solv_jsonparser *jp, char *kfn) { if (type == JP_STRING && !strcmp(jp->key, "build")) repodata_add_poolstr_array(data, handle, SOLVABLE_BUILDFLAVOR, jp->value); - else if (type == JP_STRING && !strcmp(jp->key, "build_number")) + else if (type == JP_NUMBER && !strcmp(jp->key, "build_number")) repodata_set_str(data, handle, SOLVABLE_BUILDVERSION, jp->value); else if (type == JP_ARRAY && !strcmp(jp->key, "depends")) type = parse_deps(pd, jp, &s->requires);