From 5cc90d784d5853975c2e2f82b6b6e75b633bd30b Mon Sep 17 00:00:00 2001 From: Marti Maria Date: Tue, 5 Nov 2024 09:45:11 +0100 Subject: [PATCH] Fix gamut check on floats Due to several optimizations introduced in 2.16, gamut check was broken. Added a fix and a unit test. Thanks to Christian Schmitz and Danny Pascale for discovering this. --- src/cmsxform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmsxform.c b/src/cmsxform.c index 2f8b4e5e..f09ef7d1 100644 --- a/src/cmsxform.c +++ b/src/cmsxform.c @@ -295,7 +295,7 @@ void FloatXFORM(_cmsTRANSFORM* p, // Certainly, out of gamut for (c = 0; c < cmsMAXCHANNELS; c++) - fOut[c] = -1.0; + fOut[c] = 1.0; } else {