summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-26 02:59:22 -0500
committerJune McEnroe <june@causal.agency>2020-02-26 02:59:34 -0500
commit3542b79628b986c5b87ea572a45f4c61d5952056 (patch)
tree42ae8c1bde1467c338e0fde58f788b54e3af5561
parentAlso skip the origin in wordcmp (diff)
downloadpounce-3542b79628b986c5b87ea572a45f4c61d5952056.tar.gz
pounce-3542b79628b986c5b87ea572a45f4c61d5952056.zip
Clean up intercept tag skip
"Tag skip" like it's a speedrun :3
Diffstat (limited to '')
-rw-r--r--client.c6
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;