summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Massey <bart@cs.pdx.edu>2013-08-22 09:44:41 -0700
committerBart Massey <bart@cs.pdx.edu>2013-08-23 16:41:55 -0700
commit70d244bf84b5b931c506d36db83c7f676ad557fe (patch)
treecf47b199ec2b3c69ad6f6624d70ee738531ae523
parentf3d7d7a8ec1090d08ab054f4d36ca21c2322ddec (diff)
Fixed endianness bug in xy pixmap getimage.
The endianness of the returned bit planes does not depend on the host bit order in the current server, and apparently not in the spec. So..yeah.
-rw-r--r--image/xcb_image.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/image/xcb_image.c b/image/xcb_image.c
index b09bfb9..5cfe383 100644
--- a/image/xcb_image.c
+++ b/image/xcb_image.c
@@ -340,9 +340,7 @@ xcb_image_get (xcb_connection_t * conn,
image->plane_mask = plane_mask;
size = image->height * image->stride;
dst_plane = image->data;
- if (image->bit_order == XCB_IMAGE_ORDER_MSB_FIRST)
- rpm = xcb_bit_reverse(plane_mask, imrep->depth);
- for (i = 0; i < imrep->depth; i++) {
+ for (i = imrep->depth - 1; i >= 0; --i) {
if (rpm & (1 << i)) {
memcpy(dst_plane, src_plane, size);
src_plane += size;