diff options
author | Timo Sirainen <cras@irssi.org> | 2000-06-01 17:17:45 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-06-01 17:17:45 +0000 |
commit | 4dd5c50390534a2f4796738b7ed68c853ff0e8e3 (patch) | |
tree | 0b7a898f39e0be70f2c723ecb56b04b1d385201a /src/core/misc.c | |
parent | 6233d6d9bfafd1b630ae97e18ae3f75ea26ee266 (diff) | |
download | irssi-4dd5c50390534a2f4796738b7ed68c853ff0e8e3.zip |
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
Diffstat (limited to 'src/core/misc.c')
-rw-r--r-- | src/core/misc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/misc.c b/src/core/misc.c index 78190db2..6315b906 100644 --- a/src/core/misc.c +++ b/src/core/misc.c @@ -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); |