Commit 55482c1c authored by Adam Jackson's avatar Adam Jackson 🥃

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.
parent 59252538
Pipeline #71045 passed with stages
in 6 minutes and 44 seconds
...@@ -793,8 +793,10 @@ static CARD32 ...@@ -793,8 +793,10 @@ static CARD32
xRenderColorToCard32(xRenderColor c) xRenderColorToCard32(xRenderColor c)
{ {
return return
(c.alpha >> 8 << 24) | ((unsigned)c.alpha >> 8 << 24) |
(c.red >> 8 << 16) | (c.green & 0xff00) | (c.blue >> 8); ((unsigned)c.red >> 8 << 16) |
((unsigned)c.green & 0xff00) |
((unsigned)c.blue >> 8);
} }
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment