[gimp/gimp-2-10] app: Print 2-digit LittleCMS minor versions correctly



commit 261eff08f4dc2f6761d2efb91165d29bdcc32c2e
Author: Simon McVittie <smcv debian org>
Date:   Sat Apr 3 11:18:30 2021 +0100

    app: Print 2-digit LittleCMS minor versions correctly
    
    LittleCMS 2.12.0 defines LCMS_VERSION as 2120. We want to print that
    as 2.12.0, not 2.2.0.
    
    Resolves: https://gitlab.gnome.org/GNOME/gimp/-/issues/6505
    Signed-off-by: Simon McVittie <smcv debian org>
    (cherry picked from commit e54bfa58b1e77ae73459d6e0bd39955750d82c8d)

 app/sanity.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/app/sanity.c b/app/sanity.c
index 21c7c5abe1..61c1b32e15 100644
--- a/app/sanity.c
+++ b/app/sanity.c
@@ -402,16 +402,16 @@ sanity_check_lcms (void)
          "built against.\n\n"
          "Please make sure that the installed LittleCMS version\n"
          "is at least %d.%d and that headers and library match.",
-         LCMS_VERSION / 1000, LCMS_VERSION % 100 / 10,
-         lcms_version / 1000, lcms_version % 100 / 10,
-         LCMS_VERSION / 1000, LCMS_VERSION % 100 / 10);
+         LCMS_VERSION / 1000, LCMS_VERSION % 1000 / 10,
+         lcms_version / 1000, lcms_version % 1000 / 10,
+         LCMS_VERSION / 1000, LCMS_VERSION % 1000 / 10);
     }
 
   if (lcms_version < (LCMS_REQUIRED_MAJOR * 1000 +
                       LCMS_REQUIRED_MINOR * 10))
     {
       const gint lcms_major_version = lcms_version / 1000;
-      const gint lcms_minor_version = lcms_version % 100 / 10;
+      const gint lcms_minor_version = lcms_version % 1000 / 10;
 
       return g_strdup_printf
         ("Liblcms2 version too old!\n\n"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]