summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-05-24 12:25:15 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-05-25 16:55:43 +1000
commit1b71e0a8b9e915c806f6c3596b6ee5913d62fdc3 (patch)
tree1114cef1b81986711c95cecc925053381ce36d8d
parentf7a2da6df80044bf2d92b0bee94a13f7d76960ad (diff)
xfree86: fix multiple InputAttributes tag matching.
attr->tags is an array of strings (null-terminated). When matching, match against each string instead of each [i,end] substring in the first tag. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit b5e0f6d8f45c5b24eb50b305c66fa80c783ef488)
-rw-r--r--hw/xfree86/common/xf86Xinput.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index a1a5527f4..bfa8dc0d4 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -551,9 +551,9 @@ InputClassMatches(XF86ConfInputClassPtr iclass, InputAttributes *attrs)
return FALSE;
for (cur = iclass->match_tag, match = FALSE; *cur && !match; cur++) {
- const char *tag;
- for(tag = *attrs->tags; *tag; tag++) {
- if (!strcmp(tag, *cur)) {
+ char * const *tag;
+ for(tag = attrs->tags; *tag; tag++) {
+ if (!strcmp(*tag, *cur)) {
match = TRUE;
break;
}