]> PatchyGit - patchyircd.git/commitdiff
fix globs again
authorEgor <egor@patchysicp.xyz>
Wed, 11 May 2022 21:24:47 +0000 (00:24 +0300)
committerEgor <egor@patchysicp.xyz>
Wed, 11 May 2022 21:24:47 +0000 (00:24 +0300)
glob.c

diff --git a/glob.c b/glob.c
index 69e4466..22973c7 100644 (file)
--- 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;