8157764: Better handling of interpolation plugins
authorvadim
Tue, 28 Jun 2016 11:37:04 -0700
changeset 41568 eb6d80cff6c7
parent 41567 10ed0e790b06
child 41569 aaab73f0c4d8
8157764: Better handling of interpolation plugins Reviewed-by: prr, serb, mschoene
jdk/src/java.desktop/share/native/liblcms/cmsintrp.c
--- a/jdk/src/java.desktop/share/native/liblcms/cmsintrp.c	Tue Jun 28 11:35:38 2016 -0700
+++ b/jdk/src/java.desktop/share/native/liblcms/cmsintrp.c	Tue Jun 28 11:37:04 2016 -0700
@@ -244,7 +244,7 @@
 // To prevent out of bounds indexing
 cmsINLINE cmsFloat32Number fclamp(cmsFloat32Number v)
 {
-    return v < 0.0f ? 0.0f : (v > 1.0f ? 1.0f : v);
+    return v < 0.0f || isnan(v) ? 0.0f : (v > 1.0f ? 1.0f : v);
 }
 
 // Floating-point version of 1D interpolation