[PATCH 2/3] evdev: Initialize valuators array. (#24737)
Bartosz Brachaczek
b.brachaczek at gmail.com
Tue Aug 10 13:31:37 PDT 2010
The array needs to be filled with zeros, otherwise we may end up sending
it with random values if non-zero values aren't in one row (which is the
case for A4Tech X-750F which sends REL_MISC events without a reason).
X.Org Bug 24737 <http://bugs.freedesktop.org/show_bug.cgi?id=24737>
Signed-off-by: Bartosz Brachaczek <b.brachaczek at gmail.com>
Tested-by: Bartek Iwaniec <hash87 at gmail.com>
---
src/evdev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/evdev.c b/src/evdev.c
index 18f3fb7..31fe1d6 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -662,7 +662,7 @@ static void
EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev)
{
int num_v = 0, first_v = 0;
- int v[MAX_VALUATORS];
+ int v[MAX_VALUATORS] = {};
EvdevPtr pEvdev = pInfo->private;
EvdevProcessValuators(pInfo, v, &num_v, &first_v);
--
1.7.2
More information about the xorg-devel
mailing list