changeset 11933:11f1127e9684

8157764: Better handling of interpolation plugins Reviewed-by: prr, serb, mschoene
author mcherkas
date Wed, 06 Jul 2016 17:56:09 +0300
parents 591e8ad7cf8f
children 7776a75bfaf8
files src/share/native/sun/java2d/cmm/lcms/cmsintrp.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c	Tue Jul 05 15:00:52 2016 -0700
+++ b/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c	Wed Jul 06 17:56:09 2016 +0300
@@ -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