Commit 7d8de88f authored by Erwan Croze's avatar Erwan Croze 👋🏻

Fix check of available version

parent 065c0198
......@@ -7408,9 +7408,11 @@ typedef struct _parsed_version_st {
} parsed_version_t;
static int compare_parsed_versions(parsed_version_t current_version, parsed_version_t last_version) {
bool same_major = (last_version.major == current_version.major);
bool same_minor = (last_version.minor == current_version.minor);
if (last_version.major > current_version.major) return 1;
if (last_version.minor > current_version.minor) return 1;
if (last_version.patch > current_version.patch) return 1;
if (same_major && last_version.minor > current_version.minor) return 1;
if (same_minor && last_version.patch > current_version.patch) return 1;
return -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment