Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: third_party/lcms2-2.6/src/cmsintrp.c

Issue 2482523003: lcms: backport upstream commit c0a98d86 (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/lcms2-2.6/README.pdfium ('k') | third_party/lcms2-2.6/src/cmsio0.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/lcms2-2.6/src/cmsintrp.c
diff --git a/third_party/lcms2-2.6/src/cmsintrp.c b/third_party/lcms2-2.6/src/cmsintrp.c
index 5d5f35d3fcf8c3578d51692b0799fddbebc765af..14c68563cad0294dc95bc63907a3e7149aa5cdf8 100644
--- a/third_party/lcms2-2.6/src/cmsintrp.c
+++ b/third_party/lcms2-2.6/src/cmsintrp.c
@@ -215,7 +215,7 @@ void LinLerp1D(register const cmsUInt16Number Value[],
// 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
« no previous file with comments | « third_party/lcms2-2.6/README.pdfium ('k') | third_party/lcms2-2.6/src/cmsio0.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698