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 <[email protected]> --- Not visible from the context, the code is essentially: char *s = NULL; while (s && ... ) { .. parse mapping } Which was fine before 8af0e6 when s was initialised to "". It's broken now though. src/evdev.c | 4 ++-- 1 file 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); } -- 1.7.10.4 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
