From b5e0f6d8f45c5b24eb50b305c66fa80c783ef488 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 24 May 2010 12:25:15 +1000 Subject: [PATCH] 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 Reviewed-by: Jamey Sharp Signed-off-by: Keith Packard --- hw/xfree86/common/xf86Xinput.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index ac287aa61..2e254821e 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; }