Fix byte shift arithmetic for big-endian. (Tracked down with help from

Fri Mar 15 15:37:01 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (convert_to_format):
        Fix byte shift arithmetic for big-endian. (Tracked
        down with help from Tuomas Kuosmanen)
This commit is contained in:
Owen Taylor
2002-03-15 20:43:13 +00:00
committed by Owen Taylor
parent 51c6334d10
commit 4997dc2aa5
9 changed files with 45 additions and 3 deletions

View File

@ -1033,8 +1033,8 @@ convert_to_format (guchar *src_buf,
while (p < end)
{
*q = (((*p & 0xff000000) >> 24) |
((*p & 0x00ffffff) << 8));
*q = (((*p & 0xffffff00) >> 8) |
((*p & 0x000000ff) << 24));
q++;
p++;
}