summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Batz <senneth@irssi.org>2005-05-14 18:01:07 +0000
committervb <vb@dbcabf3a-b0e7-0310-adc4-f8d773084564>2005-05-14 18:01:07 +0000
commit5a280a620d37ac223e0ece5fdf15b706c96e1fce (patch)
treee8d0a91d4050d5f1bfda3e14fb936d4c97ca50e1
parentc371640471d3dc47dd6cd48dcec819c725637890 (diff)
downloadirssi-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
-rw-r--r--src/fe-common/core/chat-completion.c2
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);
}