forked from PsychoticNinja/irssi
match_wildcards() didn't work right if data contained '*' characters and
we were matching it to '*'.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@262 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
6233d6d9bf
commit
4dd5c50390
@ -379,14 +379,14 @@ int match_wildcards(const char *cmask, const char *data)
|
||||
|
||||
newmask = mask = g_strdup(cmask);
|
||||
for (; *mask != '\0' && *data != '\0'; mask++) {
|
||||
if (*mask == '?' || toupper(*mask) == toupper(*data)) {
|
||||
if (*mask != '*') {
|
||||
if (*mask != '?' && toupper(*mask) != toupper(*data))
|
||||
break;
|
||||
|
||||
data++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (*mask != '*')
|
||||
break;
|
||||
|
||||
while (*mask == '?' || *mask == '*') mask++;
|
||||
if (*mask == '\0') {
|
||||
data += strlen(data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user