color: fix -Wmissing-braces

This commit is contained in:
Andrei Alexeyev 2022-11-11 01:10:00 +01:00
parent 748b92fc7f
commit 058a1ac727
No known key found for this signature in database
GPG key ID: 72D26128040B9690

View file

@ -28,7 +28,7 @@ typedef union Color {
* and has automatic storage-class.
*/
#define RGBA(r, g, b, a) (&(Color) { (r), (g), (b), (a) })
#define RGBA(r, g, b, a) (&(Color) { { (r), (g), (b), (a) } })
#define RGBA_MUL_ALPHA(r, g, b, a) color_mul_alpha(RGBA((r), (g), (b), (a)))
#define RGB(r, g, b) RGBA((r), (g), (b), 1)