mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 11:08:15 +02:00
render: Fix byteswapping of gradient stops
The function swapStops repeatedly swaps the color components as
CARD16, but incorrectly steps over them as if they were CARD32.
This causes half of the stops not to be swapped at all and some
unrelated data be swapped instead.
Signed-off-by: Andrea Canciani <ranma42@gmail.com>
Reviewed-by: Soren Sandmann <sandmann@daimi.au.dk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit dab064fa5e)
This commit is contained in:
parent
6f7f3e2b79
commit
472163b7f3
1 changed files with 2 additions and 2 deletions
|
|
@ -2565,8 +2565,8 @@ static void swapStops(void *stuff, int num)
|
|||
}
|
||||
colors = (CARD16 *)(stops);
|
||||
for (i = 0; i < 4*num; ++i) {
|
||||
swaps(stops, n);
|
||||
++stops;
|
||||
swaps(colors, n);
|
||||
++colors;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue