From b132b979da9f7afeee4f3f4fb9720a16f38c5868 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Tue, 2 Jun 2015 22:47:25 +0200 Subject: kike: avoid printf-ing a null string --- kike.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kike.c b/kike.c index 8400e45..a197c5c 100644 --- a/kike.c +++ b/kike.c @@ -827,7 +827,8 @@ client_close_link (struct client *c, const char *reason) // it, with some arbitrary timeout. The `closing_link' state makes sure // that a/ we ignore any successive messages, and b/ that the connection // is killed after the write buffer is transferred and emptied. - client_send (c, "ERROR :Closing Link: %s[%s] (%s)", c->nickname, + client_send (c, "ERROR :Closing Link: %s[%s] (%s)", + c->nickname ? c->nickname : "", c->hostname /* TODO host IP? */, reason); c->closing_link = true; -- cgit v1.2.3-70-g09d2