summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZephaniah E. Hull <warp@aehallh.com>2006-02-20 09:18:56 +0000
committerZephaniah E. Hull <warp@aehallh.com>2006-02-20 09:18:56 +0000
commit763edd37305e789bcc31746e5ea41f4df9d0b2a4 (patch)
tree81b9f6e09f159acb58912e5589cc103d7927db34 /src
parentc6dbf89d9d40fcbce72493404ea02b7e7957513f (diff)
Bugzilla #5950 <https://bugs.freedesktop.org/show_bug.cgi=5950> Possible
(maybe) fix for bug #5950. Though, I'm not convinced and still don't see how this bug could be happening, especially if this doesn't do it.
Diffstat (limited to 'src')
-rw-r--r--src/evdev_btn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/evdev_btn.c b/src/evdev_btn.c
index cc279ff..9a2c2cf 100644
--- a/src/evdev_btn.c
+++ b/src/evdev_btn.c
@@ -87,9 +87,9 @@ EvdevBtnInit (DeviceIntPtr device)
if (!pEvdev->state.buttons)
return Success;
- map = Xcalloc (sizeof (CARD8) * pEvdev->state.buttons);
+ map = Xcalloc (sizeof (CARD8) * (pEvdev->state.buttons + 1));
- for (i = 0; i < pEvdev->state.buttons; i++)
+ for (i = 0; i <= pEvdev->state.buttons; i++)
map[i] = i;
xf86Msg(X_ERROR, "%s (%d): Registering %d buttons.\n", __FILE__, __LINE__,