config: fix asan signed integer overflow warning

This commit is contained in:
Daniel Eklöf 2021-01-02 12:53:24 +01:00
parent 5b13b5315f
commit 47c42b507f
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -56,9 +56,9 @@ conf_to_color(const struct yml_node *node)
alpha |= alpha << 8;
return (pixman_color_t){
.red = (red << 8 | red) * alpha / 0xffff,
.green = (green << 8 | green) * alpha / 0xffff,
.blue = (blue << 8 | blue) * alpha / 0xffff,
.red = (uint32_t)(red << 8 | red) * alpha / 0xffff,
.green = (uint32_t)(green << 8 | green) * alpha / 0xffff,
.blue = (uint32_t)(blue << 8 | blue) * alpha / 0xffff,
.alpha = alpha,
};
}