Merge branch 'master' into blender2.8
[blender.git] / source / blender / makesrna / intern / rna_ID.c
index 8ff46d4d17a4efd4e1ad7efb699a91bf2ebaeb98..27c3cee422cd3527f6e67091942df1a147ab9349 100644 (file)
@@ -679,7 +679,7 @@ static void rna_ImagePreview_pixels_float_set(PointerRNA *ptr, const float *valu
        }
 
        for (i = 0; i < len; i++) {
-               data[i] = FTOCHAR(values[i]);
+               data[i] = unit_float_to_uchar_clamp(values[i]);
        }
        prv_img->flag[size] |= PRV_USER_EDITED;
 }