From 2dc5507d3a0f04385880484bff5d45bdf5cb0ee9 Mon Sep 17 00:00:00 2001 From: pk910 Date: Mon, 30 Jan 2012 20:41:07 +0100 Subject: [PATCH] fixed crash in ext_amsg_block (some systems cut off the \n at the end of the line) --- ircd/channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ircd/channel.c b/ircd/channel.c index 5a17a6b..dc8783c 100644 --- a/ircd/channel.c +++ b/ircd/channel.c @@ -4346,7 +4346,7 @@ int ext_amsg_block(struct Client *cptr, struct Channel *chptr, const char *msg) int p_pos = 0; int is_visible = 1, is_ccode = 0, i = 0, j = 0; char codes[5]; - for(i = 0; p != '\n'; p = stripped_message[++i]) { + for(i = 0; p != '\n' && p != 0; p = stripped_message[++i]) { if(p == 3) { j = 0; is_ccode = 1; -- 2.20.1