InitValuatorAxisStruct() will return if the axisnum > num_axes and not
initialise anything which is why the current code worked without issues.
With a new patch to the server this will now complain with an error message
to the log.
Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
src/xf86Wacom.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
index 5289292..6ecf036 100644
--- a/src/xf86Wacom.c
+++ b/src/xf86Wacom.c
@@ -296,20 +296,21 @@ static int wcmInitAxes(DeviceIntPtr pWcm)
/* seventh valuator: abswheel2 */
- index = 6;
- label = None;
- mode = Absolute;
- min_res = max_res = res = 1;
- min = 0;
- max = 1;
-
if ((TabletHasFeature(common, WCM_DUALRING)) && IsPad(priv))
- { /* XXX: what is this axis label? */
+ {
+ /* XXX: what is this axis label? */
+ index = 6;
+ label = None;
+ mode = Absolute;
+ min_res = max_res = res = 1;
+ min = 0;
+ max = 1;
+
min = MIN_PAD_RING;
max = MAX_PAD_RING;
- }
- wcmInitAxis(pInfo->dev, index, label, min, max, res, min_res, max_res,
mode);
+ wcmInitAxis(pInfo->dev, index, label, min, max, res, min_res,
max_res, mode);
+ }
return TRUE;
}
--
1.8.1.4
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel