summaryrefslogtreecommitdiff
path: root/lcms2mt
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2021-08-30 16:50:10 +0100
committerRobin Watts <Robin.Watts@artifex.com>2021-08-31 13:17:57 +0100
commit248d76d86d0e191d748a06a5e57b2ab8e977322c (patch)
tree6bfeaabd1a9371b83561fc790774ad4a6025e801 /lcms2mt
parent74f11156cad81f91922dbb9488215a8610cd6d9a (diff)
downloadghostpdl-248d76d86d0e191d748a06a5e57b2ab8e977322c.tar.gz
Fix lcms2mt plugin version handling for transforms.
lcms2mt uses version numbers BELOW that of lcms2. This meant that we were incorrectly spotting CALs plugin as being an old style one.
Diffstat (limited to 'lcms2mt')
-rw-r--r--lcms2mt/src/cmsplugin.c2
-rw-r--r--lcms2mt/src/cmsxform.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/lcms2mt/src/cmsplugin.c b/lcms2mt/src/cmsplugin.c
index d03d059a8..279bcbd11 100644
--- a/lcms2mt/src/cmsplugin.c
+++ b/lcms2mt/src/cmsplugin.c
@@ -571,7 +571,7 @@ cmsBool CMSEXPORT cmsPlugin(cmsContext id, void* Plug_in)
if (Plugin ->ExpectedVersion < LCMS2MT_VERSION_MIN ||
Plugin ->ExpectedVersion > LCMS2MT_VERSION_MAX) {
- cmsSignalError(id, cmsERROR_UNKNOWN_EXTENSION, "plugin version %d not in acceptable version range. LCMS2.art cannot use LCMS2 plugins!",
+ cmsSignalError(id, cmsERROR_UNKNOWN_EXTENSION, "plugin version %d not in acceptable version range. LCMS2MT cannot use LCMS2 plugins!",
Plugin ->ExpectedVersion);
return FALSE;
}
diff --git a/lcms2mt/src/cmsxform.c b/lcms2mt/src/cmsxform.c
index 689656f9a..7f4e15896 100644
--- a/lcms2mt/src/cmsxform.c
+++ b/lcms2mt/src/cmsxform.c
@@ -1881,8 +1881,10 @@ cmsBool _cmsRegisterTransformPlugin(cmsContext ContextID, cmsPluginBase* Data)
if (fl == NULL) return FALSE;
// Check for full xform plug-ins previous to 2.8, we would need an adapter in that case
- if (Plugin->base.ExpectedVersion < 2080) {
-
+ if ((Plugin->base.ExpectedVersion <= LCMS2MT_VERSION_MAX &&
+ Plugin->base.ExpectedVersion < 2080-2000) ||
+ (Plugin->base.ExpectedVersion > LCMS2MT_VERSION_MAX &&
+ Plugin->base.ExpectedVersion < 2080)) {
fl->OldXform = TRUE;
}
else