summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wcmUSB.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wcmUSB.c b/src/wcmUSB.c
index b817409..064fab3 100644
--- a/src/wcmUSB.c
+++ b/src/wcmUSB.c
@@ -365,7 +365,7 @@ static Bool usbWcmInit(InputInfoPtr pInfo, char* id, float *version)
/* If mouse buttons detected but no mouse tool
* then they must be associated with pad buttons.
*/
- for (i = ARRAY_SIZE(mouse_codes); i > 0; i--)
+ for (i = ARRAY_SIZE(mouse_codes) - 1; i > 0; i--)
if (ISBITSET(common->wcmKeys, mouse_codes[i]))
break;