diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2017-03-24 10:13:16 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2017-03-24 10:13:16 +0300 |
commit | 178708f1426dbde1d1fda33da47a76fab18e0bc8 (patch) | |
tree | 7d3c274e6927a05b779fa7bb4d156de16a306926 | |
parent | d23459f5164092fb59cd952da6ddd8c0d23170d4 (diff) |
Fix of last commit. Clamp values that will be used!
-rw-r--r-- | source/blender/blenkernel/intern/customdata.c | 8 |
1 files changed, 4 insertions, 4 deletions
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) |