mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
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
This commit is contained in:
parent
c371640471
commit
5a280a620d
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user