From a241948ad96be3a9cdf04a0ee53605d3ff4dd82b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Sep 2020 14:40:07 +1000 Subject: Fix errors ensuring grease pencil palette - Direct assignment caused ID user counts to be invalid. - The first palette would always be used, even when the named palette searched for was found. Also pass 'const' string to `hex_to_rgb`, avoid casting to 'non-const'. --- source/blender/blenlib/intern/math_color.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenlib/intern/math_color.c') diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index 09bb7ea5711..4b62d6b9b5b 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -198,7 +198,7 @@ void ycc_to_rgb(float y, float cb, float cr, float *r_r, float *r_g, float *r_b, *r_b = b / 255.0f; } -void hex_to_rgb(char *hexcol, float *r_r, float *r_g, float *r_b) +void hex_to_rgb(const char *hexcol, float *r_r, float *r_g, float *r_b) { unsigned int ri, gi, bi; -- cgit v1.2.3