If we skip over the reply data, return 0 as number of event classes.

Follow-up to 6dd6dc51a2935c72774be81e5cc2ba2c30e9feff.

Signed-off-by: Peter Hutterer <[email protected]>
---
 src/XGetProp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/XGetProp.c b/src/XGetProp.c
index b49328c..8c69ef2 100644
--- a/src/XGetProp.c
+++ b/src/XGetProp.c
@@ -104,8 +104,10 @@ XGetDeviceDontPropagateList(
                _XRead(dpy, (char *)(&ec), sizeof(CARD32));
                list[i] = (XEventClass) ec;
            }
-       } else
+       } else {
+            *count = 0;
            _XEatDataWords(dpy, rep.length);
+        }
     }
 
     UnlockDisplay(dpy);
-- 
1.8.1.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to