From 63b92672fe9ecfd400d9439343a068a3ae5224df Mon Sep 17 00:00:00 2001 From: C. McEnroe Date: Wed, 5 Feb 2020 22:18:11 -0500 Subject: Handle empty params in /quote --- command.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'command.c') diff --git a/command.c b/command.c index 2a3df9b..f9362dc 100644 --- a/command.c +++ b/command.c @@ -23,7 +23,7 @@ typedef void Command(size_t id, char *params); static void commandQuote(size_t id, char *params) { (void)id; - ircFormat("%s\r\n", params); + if (params) ircFormat("%s\r\n", params); } static void commandPrivmsg(size_t id, char *params) { @@ -65,8 +65,7 @@ static void commandQuit(size_t id, char *params) { static void commandWindow(size_t id, char *params) { (void)id; - if (!params) return; - uiShowNum(strtoul(params, NULL, 10)); + if (params) uiShowNum(strtoul(params, NULL, 10)); } static const struct Handler { -- cgit 1.4.1-2-gfad0