summaryrefslogtreecommitdiff
path: root/src/evdev.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-08-07 14:32:17 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-08-08 12:34:25 +1000
commit33e7831b5fabc5c9dcc0224800a04761086952a7 (patch)
treeaeb14395f36b7087a8db3f51865878e87cb58acb /src/evdev.c
parentbc8997e8120cc8d4f33f44e0734fa488f9fef3b0 (diff)
Fix broken ButtonMapping option (#53168)
Regression introduced in 8af0e6f1ebaf327f735bca507134b34bb24b26c6. s is now initialized to NULL, so we never entered the loop. X.Org Bug 53168 <http://bugs.freedesktop.org/show_bug.cgi?id=53168> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/evdev.c')
-rw-r--r--src/evdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/evdev.c b/src/evdev.c
index b832d98..ced6561 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1671,7 +1671,7 @@ EvdevInitButtonMapping(InputInfoPtr pInfo)
xf86IDrvMsg(pInfo, X_CONFIG, "ButtonMapping '%s'\n", mapping);
map = mapping;
- while (s && *s != '\0' && nbuttons < EVDEV_MAXBUTTONS)
+ do
{
btn = strtol(map, &s, 10);
@@ -1685,7 +1685,7 @@ EvdevInitButtonMapping(InputInfoPtr pInfo)
pEvdev->btnmap[nbuttons++] = btn;
map = s;
- }
+ } while (s && *s != '\0' && nbuttons < EVDEV_MAXBUTTONS);
free(mapping);
}