From 4dd5c50390534a2f4796738b7ed68c853ff0e8e3 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 1 Jun 2000 17:17:45 +0000 Subject: 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 --- src/core/misc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/misc.c') 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); -- cgit v1.2.3