render: Fix undefined shift in xRenderColorToCard32

Delightfully this is undefined even though CARD16 is an "unsigned" type,
because it's an unsigned short, which C promotes to signed int because
everything is stupid.
This commit is contained in:
Adam Jackson 2019-10-15 13:40:01 -04:00
parent 592525386a
commit 55482c1caf

View File

@ -793,8 +793,10 @@ static CARD32
xRenderColorToCard32(xRenderColor c)
{
return
(c.alpha >> 8 << 24) |
(c.red >> 8 << 16) | (c.green & 0xff00) | (c.blue >> 8);
((unsigned)c.alpha >> 8 << 24) |
((unsigned)c.red >> 8 << 16) |
((unsigned)c.green & 0xff00) |
((unsigned)c.blue >> 8);
}
static void