F3TOCHAR4 macro was assigning the same value twice (setting the alpha, then overwriti...
authorCampbell Barton <ideasman42@gmail.com>
Sat, 27 Aug 2011 01:20:55 +0000 (01:20 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 27 Aug 2011 01:20:55 +0000 (01:20 +0000)
source/blender/blenlib/BLI_utildefines.h

index 28ebb254f2af9e7f662cec5ff9f843fff5dc0a48..f8f8e12b341d9c58d03c6d393db66aecf7164deb 100644 (file)
 #define FTOUSHORT(val) ((val >= 1.0f-0.5f/65535)? 65535: (val <= 0.0f)? 0: (unsigned short)(val*65535.0f + 0.5f))
 #define F3TOCHAR3(v2,v1) (v1)[0]=FTOCHAR((v2[0])); (v1)[1]=FTOCHAR((v2[1])); (v1)[2]=FTOCHAR((v2[2]))
 #define F3TOCHAR4(v2,v1) { (v1)[0]=FTOCHAR((v2[0])); (v1)[1]=FTOCHAR((v2[1])); (v1)[2]=FTOCHAR((v2[2])); \
-                                               (v1)[3]=FTOCHAR((v2[3])); (v1)[3] = 255; }
+                                               (v1)[3] = 255; }
 #define F4TOCHAR4(v2,v1) { (v1)[0]=FTOCHAR((v2[0])); (v1)[1]=FTOCHAR((v2[1])); (v1)[2]=FTOCHAR((v2[2])); \
                                                (v1)[3]=FTOCHAR((v2[3])); (v1)[3]=FTOCHAR((v2[3])); }