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:
@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user