diff options
author | Timo Sirainen <cras@irssi.org> | 2002-12-31 16:06:47 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-12-31 16:06:47 +0000 |
commit | 4c506b4352b572c091f9b6553ea333fc3133c5f3 (patch) | |
tree | e7178a8f445e9e1089a7aa7980256c4abf922c9f /src/fe-common | |
parent | 3ddf3ce6b4d179129a41bf55d6647596b9734e5b (diff) | |
download | irssi-4c506b4352b572c091f9b6553ea333fc3133c5f3.zip |
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
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/chat-completion.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 */ |