about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--handle.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/handle.c b/handle.c
index 012b4ea..844fb74 100644
--- a/handle.c
+++ b/handle.c
@@ -1082,6 +1082,7 @@ static void handleReplyWhoisChannels(struct Message *msg) {
 	char *ptr = buf, *end = &buf[sizeof(buf)];
 	while (msg->params[2]) {
 		char *channel = strsep(&msg->params[2], " ");
+		if (!channel[0]) break;
 		char *name = &channel[strspn(channel, network.prefixes)];
 		ptr = seprintf(
 			ptr, end, "%s\3%02d%s\3",