From 4c506b4352b572c091f9b6553ea333fc3133c5f3 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 31 Dec 2002 16:06:47 +0000 Subject: [PATCH] don't crash with /set completion_keep_privates 0 git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3090 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/chat-completion.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fe-common/core/chat-completion.c b/src/fe-common/core/chat-completion.c index 803700de..988c311f 100644 --- a/src/fe-common/core/chat-completion.c +++ b/src/fe-common/core/chat-completion.c @@ -81,6 +81,9 @@ static void last_msg_add(GSList **list, const char *nick, int own, int max) { LAST_MSG_REC *rec; + if (max <= 0) + return; + rec = last_msg_find(*list, nick); if (rec != NULL) { /* msg already exists, update it */