Fix broken ButtonMapping option (#53168)

Regression introduced in 8af0e6f1eb.
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 33e7831b5f)
This commit is contained in:
Peter Hutterer
2012-08-07 14:32:17 +10:00
parent f2c6da0242
commit 447fd220e0

View File

@@ -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);
}