]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
repo_conda: Fix type check of build_number
authorMichael Schroeder <mls@suse.de>
Wed, 17 Apr 2019 09:55:51 +0000 (11:55 +0200)
committerMichael Schroeder <mls@suse.de>
Wed, 17 Apr 2019 09:55:51 +0000 (11:55 +0200)
It's a number, not a string. Problem spotted by Wolf Vollprecht,
thanks!

ext/repo_conda.c

index 4f76c8f78150bc25ed99c25fdddbd847bc110a64..0828aff6b3b56cd498f86d344448b391b91315e2 100644 (file)
@@ -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);