From 178708f1426dbde1d1fda33da47a76fab18e0bc8 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Fri, 24 Mar 2017 04:13:16 -0300 Subject: Fix of last commit. Clamp values that will be used! --- source/blender/blenkernel/intern/customdata.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source') diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index aca332f4bf5..debc7491fb8 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -839,10 +839,10 @@ static void layerInterp_mloopcol( /* Subdivide smooth or fractal can cause problems without clamping * although weights should also not cause this situation */ - CLAMP(col.a, 0.0f, 255.0f); - CLAMP(col.r, 0.0f, 255.0f); - CLAMP(col.g, 0.0f, 255.0f); - CLAMP(col.b, 0.0f, 255.0f); + CLAMP(mc->a, 0, 255); + CLAMP(mc->r, 0, 255); + CLAMP(mc->g, 0, 255); + CLAMP(mc->b, 0, 255); } static int layerMaxNum_mloopcol(void) -- cgit v1.2.3