summaryrefslogtreecommitdiff
path: root/src/xcb_out.c
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2009-07-06 13:14:35 -0700
committerJamey Sharp <jamey@minilop.net>2009-07-06 13:14:35 -0700
commite06955ed66cb499ada52b8add6709edd38d70054 (patch)
treeefeb723e06bc08bf45bbf2984689f1f825d95f45 /src/xcb_out.c
parent9e191c722a0be4b5f3d993165055a71f85c21882 (diff)
Fix precedence bug: wrong length for big-requests preceded by sync.
Also replace excessively clever use of bitwise OR with equivalent addition. Reported-by: Geoffrey Li <geoffrey@seitopos.com> Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'src/xcb_out.c')
-rw-r--r--src/xcb_out.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xcb_out.c b/src/xcb_out.c
index 4c6ab13..b3050fe 100644
--- a/src/xcb_out.c
+++ b/src/xcb_out.c
@@ -242,7 +242,7 @@ unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vect
vector[1].iov_base = (uint32_t *) vector[1].iov_base + 1;
vector[1].iov_len -= sizeof(uint32_t);
}
- vector[0].iov_len = sizeof(uint32_t) * (prefix[0] ? 1 : 0 | prefix[2] ? 2 : 0);
+ vector[0].iov_len = sizeof(uint32_t) * ((prefix[0] ? 1 : 0) + (prefix[2] ? 2 : 0));
vector[0].iov_base = prefix + !prefix[0];
}