From 939a6a30d02fd65a41f589777f8dbf66f4896224 Mon Sep 17 00:00:00 2001 From: Matthew Beeching Date: Sun, 23 Mar 2014 12:20:45 +0000 Subject: [PATCH] Fix for bug in CHECK output where emtpy Marks:: lines could appear --- ircd/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ircd/client.c b/ircd/client.c index a7c6c24..bdb76f6 100644 --- a/ircd/client.c +++ b/ircd/client.c @@ -444,7 +444,7 @@ void client_check_marks(struct Client *client, struct Client *replyto) memset(&markbufp, 0, BUFSIZE); for (dp = cli_marks(client); dp; dp = dp->next) { - if (strlen(markbufp) + strlen(dp->value.cp) + 4 > 70) { + if (markbufp[0] && strlen(markbufp) + strlen(dp->value.cp) + 4 > 70) { ircd_snprintf(0, outbuf, sizeof(outbuf), " Marks:: %s", markbufp); send_reply(replyto, RPL_DATASTR, outbuf); memset(&markbufp, 0, BUFSIZE);