Handle empty params in /quote

weechat-hashes
C. McEnroe 2020-02-05 22:18:11 -05:00
parent 7cc64927bd
commit 63b92672fe
1 changed files with 2 additions and 3 deletions

View File

@ -23,7 +23,7 @@ typedef void Command(size_t id, char *params);
static void commandQuote(size_t id, char *params) { static void commandQuote(size_t id, char *params) {
(void)id; (void)id;
ircFormat("%s\r\n", params); if (params) ircFormat("%s\r\n", params);
} }
static void commandPrivmsg(size_t id, char *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) { static void commandWindow(size_t id, char *params) {
(void)id; (void)id;
if (!params) return; if (params) uiShowNum(strtoul(params, NULL, 10));
uiShowNum(strtoul(params, NULL, 10));
} }
static const struct Handler { static const struct Handler {