commit a38e373ad1189397b5fe521eb9d7f3d2305a2a20
parent dcf23cdc3c8a022b3fb35346c51ea46a89921e22
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Fri, 28 Sep 2018 23:48:35 +0200
fix crash with -l when no chans are specified on CLI
thanks to pintoch for pointing this out
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/irctk.c b/irctk.c
@@ -1388,7 +1388,10 @@ void cmd_msg(char *full_line, char *target, char *line)
case DEFAULT_ALL:
//TODO2: ugly, could have generated the comma-separated string
//like for last_chans_out!
- return push_fifo_set_all(&fifos, full_line, args.channels, args.n_channels, line);
+ if (args.n_channels)
+ return push_fifo_set_all(&fifos, full_line, args.channels, args.n_channels, line);
+ else
+ return push_fifo_set(&fifos, full_line, args.nick, line); // fallback
default:
return; // won't happen