diff options
author | June McEnroe <june@causal.agency> | 2020-02-26 02:59:22 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-02-26 02:59:34 -0500 |
commit | 3542b79628b986c5b87ea572a45f4c61d5952056 (patch) | |
tree | 42ae8c1bde1467c338e0fde58f788b54e3af5561 | |
parent | Also skip the origin in wordcmp (diff) | |
download | pounce-3542b79628b986c5b87ea572a45f4c61d5952056.tar.gz pounce-3542b79628b986c5b87ea572a45f4c61d5952056.zip |
Clean up intercept tag skip
"Tag skip" like it's a speedrun :3
-rw-r--r-- | client.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/client.c b/client.c index 57895a5..ba5c325 100644 --- a/client.c +++ b/client.c @@ -295,12 +295,10 @@ static void clientParse(struct Client *client, char *line) { static bool intercept(const char *line, size_t len) { if (line[0] == '@') { const char *sp = memchr(line, ' ', len); + if (!sp) return false; + sp++; len -= sp - line; line = sp; - if (len) { - len--; - line++; - } } if (len >= 4 && !memcmp(line, "CAP ", 4)) return true; if (len == 4 && !memcmp(line, "QUIT", 4)) return true; |