summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-06-26 22:21:02 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-06-28 00:05:09 -0400
commite26a4dbfe60a5e3b47a43c76703ef1d22d6c8ae9 (patch)
tree59e31700bce524a0a2e07ca285273c3fc2bc5e42
parent97789188e8dd5fb06d7f4a15604fd5f8be918527 (diff)
downloadpango-e26a4dbfe60a5e3b47a43c76703ef1d22d6c8ae9.tar.gz
utils: Make pango_version_check more precise
The expectation of version comparisons is that major versions have to match exactly.
-rw-r--r--pango/pango-utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index 0057859e..c90b4c86 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -127,6 +127,8 @@ pango_version_check (int required_major,
gint pango_effective_micro = 100 * PANGO_VERSION_MINOR + PANGO_VERSION_MICRO;
gint required_effective_micro = 100 * required_minor + required_micro;
+ if (required_major > PANGO_VERSION_MAJOR)
+ return "Pango version too old (major mismatch)";
if (required_major < PANGO_VERSION_MAJOR)
return "Pango version too new (major mismatch)";
if (required_effective_micro < pango_effective_micro - PANGO_BINARY_AGE)