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> Reviewed-by: Jason Gerecke <killert...@gmail.com> --- src/wcmUSB.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wcmUSB.c b/src/wcmUSB.c index 3e5c31d..83d9eed 100644 --- a/src/wcmUSB.c +++ b/src/wcmUSB.c @@ -1087,6 +1087,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 ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel