mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 20:28:19 +02:00
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:
parent
592525386a
commit
55482c1caf
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue