diff options
author | Valentin Batz <senneth@irssi.org> | 2005-05-14 18:01:07 +0000 |
---|---|---|
committer | vb <vb@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2005-05-14 18:01:07 +0000 |
commit | 5a280a620d37ac223e0ece5fdf15b706c96e1fce (patch) | |
tree | e8d0a91d4050d5f1bfda3e14fb936d4c97ca50e1 /src | |
parent | c371640471d3dc47dd6cd48dcec819c725637890 (diff) | |
download | irssi-5a280a620d37ac223e0ece5fdf15b706c96e1fce.zip |
Fixed a bug where the completion history can grow without bound, patch by Toby Peterson
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3755 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/core/chat-completion.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fe-common/core/chat-completion.c b/src/fe-common/core/chat-completion.c index 84504aa0..dea73605 100644 --- a/src/fe-common/core/chat-completion.c +++ b/src/fe-common/core/chat-completion.c @@ -104,7 +104,7 @@ static void last_msg_add(GSList **list, const char *nick, int own, int max) rec = g_new(LAST_MSG_REC, 1); rec->nick = g_strdup(nick); - if ((int)g_slist_length(*list) == max) { + while ((int)g_slist_length(*list) >= max) { last_msg_destroy(list, g_slist_last(*list)->data); } |