diff options
author | Andrea Canciani <ranma42@gmail.com> | 2010-11-02 20:10:32 +0100 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2010-12-03 11:32:12 +0100 |
commit | 472163b7f3a5e7aa7f40fa81b1facc71dd3529bc (patch) | |
tree | ebd408caf9903e7716201c9cb8865c08e3e183cf | |
parent | 6f7f3e2b799984e1b8aade89726dc226fc0b89ac (diff) |
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 dab064fa5e0b1f5c67222562ad5367005832cba1)
-rw-r--r-- | render/render.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/render/render.c b/render/render.c index b78c75b70..405f7dbbe 100644 --- a/render/render.c +++ b/render/render.c @@ -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; } } |