diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-08-07 14:32:17 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-08-13 16:21:38 +1000 |
commit | 447fd220e05752ec9ab388cc78826c297e1b7e24 (patch) | |
tree | a5290a79159ed01032716fae1599d6d782f24157 | |
parent | f2c6da02429eaabf9111d54c41bf46aa19b49776 (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>
(cherry picked from commit 33e7831b5fabc5c9dcc0224800a04761086952a7)
-rw-r--r-- | src/evdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/evdev.c b/src/evdev.c index 6729f23..54772c7 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1665,7 +1665,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); @@ -1679,7 +1679,7 @@ EvdevInitButtonMapping(InputInfoPtr pInfo) pEvdev->btnmap[nbuttons++] = btn; map = s; - } + } while (s && *s != '\0' && nbuttons < EVDEV_MAXBUTTONS); free(mapping); } |