summaryrefslogtreecommitdiff
path: root/Xi/queryst.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xi/queryst.c')
-rw-r--r--Xi/queryst.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Xi/queryst.c b/Xi/queryst.c
index 60ec32ec9..2ba1edb63 100644
--- a/Xi/queryst.c
+++ b/Xi/queryst.c
@@ -147,7 +147,7 @@ ProcXQueryDeviceState(ClientPtr client)
if (v != NULL) {
tv = (xValuatorState *) buf;
tv->class = ValuatorClass;
- tv->length = sizeof(xValuatorState);
+ tv->length = sizeof(xValuatorState) + v->numAxes * 4;
tv->num_valuators = v->numAxes;
tv->mode = v->mode;
buf += sizeof(xValuatorState);