diff options
author | Jason Gerecke <killertofu@gmail.com> | 2013-09-11 09:55:46 -0700 |
---|---|---|
committer | Jason Gerecke <killertofu@gmail.com> | 2013-09-19 16:13:08 -0700 |
commit | 6cadaf2eabb91e47963054e1628374861fea6209 (patch) | |
tree | d17e89142e8795bfd67fbfe4f2012b43742883e1 | |
parent | cde2718ac432f5d745b9ff5ccf6d4f8c2f4fc499 (diff) | |
download | xf86-input-wacom-6cadaf2eabb91e47963054e1628374861fea6209.tar.gz |
Correct return value of special_map_button
The 'special_map_*' functions called by 'parse_actions' are expected
to return a count of the number of words of input they have consumed.
The 'special_map_buttom' function errounously returns the number of
actions added instead, causing the program to potentially skip over
requested actions which follow a list of "button" actions.
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
-rw-r--r-- | tools/xsetwacom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c index b9b8a84..bbe25ea 100644 --- a/tools/xsetwacom.c +++ b/tools/xsetwacom.c @@ -1021,7 +1021,7 @@ static int special_map_button(Display *dpy, int argc, char **argv, unsigned long need_press = need_release = 1; if (sscanf(btn, "%d", &button) != 1) - return nitems; + break; TRACE("Button map %d [%s,%s]\n", abs(button), @@ -1044,7 +1044,7 @@ static int special_map_button(Display *dpy, int argc, char **argv, unsigned long } *ndata += nitems; - return nitems; + return i; } /* Return the first keycode to have the required keysym in the current group. |