Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: GitHub noreply@github.com Date: Tue, 17 Oct 2023 16:42:25 UTC Commit: e794cccccf09f2db4d6963e08204a91c9623931d https://github.com/geany/geany-plugins/commit/e794cccccf09f2db4d6963e08204a9...
Log Message: ----------- Merge pull request #1284 from techee/updatechecker
updatechecker: Fix logic comparing version numbers
Modified Paths: -------------- updatechecker/src/updatechecker.c
Modified: updatechecker/src/updatechecker.c 22 lines changed, 14 insertions(+), 8 deletions(-) =================================================================== @@ -166,16 +166,22 @@ version_compare(const gchar *current_version) parse_version_string(current_version, &geany_current.major, &geany_current.minor, &geany_current.mini, &geany_current.extra);
- if ((geany_running.major < geany_current.major) || - (geany_running.minor < geany_current.minor) || - (geany_running.minor < geany_current.minor)) - { + if (geany_running.major < geany_current.major) return TRUE; - } - else - { + if (geany_running.major > geany_current.major) return FALSE; - } + + if (geany_running.minor < geany_current.minor) + return TRUE; + if (geany_running.minor > geany_current.minor) + return FALSE; + + if (geany_running.mini < geany_current.mini) + return TRUE; + if (geany_running.mini > geany_current.mini) + return FALSE; + + return FALSE; }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org