From: Egor Date: Wed, 11 May 2022 21:24:47 +0000 (+0300) Subject: fix globs again X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=c5e6157244fb10fb5cb3a0093258d6b3601da046;p=patchyircd.git fix globs again --- diff --git a/glob.c b/glob.c index 69e4466..22973c7 100644 --- a/glob.c +++ b/glob.c @@ -29,12 +29,12 @@ int irc_glob(const char *key, const char *mask) } break; case '*': - key2 = key + 1; + key2 = *key ? key + 1 : 0; mask2 = mask++; continue; } } - if (key2 && *key2) { + if (key2) { key = key2; mask = mask2; continue;