From: Egbert Eich <e...@suse.com> A protocol 5 tool will send an ABS event code=ABS_MISC with value 0. 0 is however not a valid device ID. Don't try to derive a type from it.
Signed-off-by: Egbert Eich <e...@suse.com> --- src/wcmUSB.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wcmUSB.c b/src/wcmUSB.c index 14fff1b..3d6cdc0 100644 --- a/src/wcmUSB.c +++ b/src/wcmUSB.c @@ -1066,6 +1066,9 @@ static int usbIdToType(int id) { int type = STYLUS_ID; + if (!id) + return 0; + /* The existing tool ids have the following patten: all pucks, except * one, have the third byte set to zero; all erasers have the fourth * bit set. The rest are styli. -- 1.8.4.5 ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel