summaryrefslogtreecommitdiff
path: root/src/core/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/misc.c')
-rw-r--r--src/core/misc.c8
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);