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>
This commit is contained in:
Peter Hutterer 2010-05-24 12:25:15 +10:00 committed by Keith Packard
parent 5939e39a64
commit b5e0f6d8f4

View File

@ -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;
}