summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/evdev.c4
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);
}