offset was always 0 + nitems which wasn't a problem as long as we don't
support multiple keywords ("key a button 1 key b"). If multiple keywords are
supported, the offset needs to move to the current, otherwise we overwrite.

Signed-off-by: Peter Hutterer <[email protected]>
---
 tools/xsetwacom.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
index 380c05e..d865fc5 100644
--- a/tools/xsetwacom.c
+++ b/tools/xsetwacom.c
@@ -1176,9 +1176,9 @@ static int special_map_keystrokes(int argc, char **argv, 
unsigned long *ndata, u
 
                ks = XStringToKeysym(key);
                if (need_press)
-                       data[nitems++] = AC_KEY | AC_KEYBTNPRESS | ks;
+                       data[*ndata + nitems++] = AC_KEY | AC_KEYBTNPRESS | ks;
                if (need_release)
-                       data[nitems++] = AC_KEY | ks;
+                       data[*ndata + nitems++] = AC_KEY | ks;
        }
 
        *ndata += nitems;
-- 
1.6.6.1


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to