RLE: Don't trash alpha channel in copy_32().

It was being set to (mask|value) instead of (value).

Thanks to li zhuo for the bug report!
This commit is contained in:
Ryan C. Gordon 2011-08-22 13:34:58 -04:00
parent 08f49bd2d3
commit 747072f8a3

View file

@ -984,10 +984,9 @@ copy_32(void *dst, Uint32 * src, int n,
Uint32 *d = dst;
for (i = 0; i < n; i++) {
unsigned r, g, b, a;
Uint32 pixel;
RGBA_FROM_8888(*src, sfmt, r, g, b, a);
PIXEL_FROM_RGB(pixel, dfmt, r, g, b);
*d++ = pixel | a << 24;
PIXEL_FROM_RGBA(*d, dfmt, r, g, b, a);
d++;
src++;
}
return n * 4;