summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2013-07-16 08:11:40 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2013-07-16 08:11:40 +0000
commit5aefe108763aee1e6623dd2474baab0abf36aa51 (patch)
tree1223e34d58b99522a34663c80fff9e50343dd588
parent52781f2247e39e0d5a471cbe18393655948f668a (diff)
Correctly initialized the width value to 0 instead of passing garbage
to wsmouse_input() when no finger are reported. Pointed out by Maxime Villard.
-rw-r--r--sys/dev/pckbc/pms.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pckbc/pms.c b/sys/dev/pckbc/pms.c
index 3893b602902..67bd1d83341 100644
--- a/sys/dev/pckbc/pms.c
+++ b/sys/dev/pckbc/pms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pms.c,v 1.44 2013/06/28 18:32:01 jcs Exp $ */
+/* $OpenBSD: pms.c,v 1.45 2013/07/16 08:11:39 mpi Exp $ */
/* $NetBSD: psm.c,v 1.11 2000/06/05 22:20:57 sommerfeld Exp $ */
/*-
@@ -1440,6 +1440,8 @@ pms_proc_alps(struct pms_softc *sc)
/* Generate a width value corresponding to one finger */
if (z > 0)
w = 4;
+ else
+ w = 0;
wsmouse_input(sc->sc_wsmousedev, buttons, x, y, z, w,
WSMOUSE_INPUT_ABSOLUTE_X | WSMOUSE_INPUT_ABSOLUTE_Y |