summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/glapi/glX_proto_send.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/glapi/glX_proto_send.py b/src/mesa/glapi/glX_proto_send.py
index 15be86bc9f..023b07ee3b 100644
--- a/src/mesa/glapi/glX_proto_send.py
+++ b/src/mesa/glapi/glX_proto_send.py
@@ -75,13 +75,13 @@ read_reply( Display *dpy, size_t size, void * dest, GLboolean reply_is_always_ar
(void) _XReply(dpy, (xReply *) & reply, 0, False);
if (size != 0) {
- if ((reply.size >= 1) || reply_is_always_array) {
+ if ((reply.length > 0) || reply_is_always_array) {
const GLint bytes = (reply_is_always_array)
? (4 * reply.length) : (reply.size * size);
const GLint extra = 4 - (bytes & 3);
_XRead(dpy, dest, bytes);
- if ( extra != 0 ) {
+ if ( extra < 4 ) {
_XEatData(dpy, extra);
}
}