1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-13 05:03:45 -04:00

allow rawlog-buffer to shrink again after lowering "rawlog_lines"

This commit is contained in:
teschi 2019-02-23 22:19:35 +01:00
parent 01ce66c684
commit c61a171114

View File

@ -62,7 +62,7 @@ void rawlog_destroy(RAWLOG_REC *rawlog)
/* NOTE! str must be dynamically allocated and must not be freed after! */ /* NOTE! str must be dynamically allocated and must not be freed after! */
static void rawlog_add(RAWLOG_REC *rawlog, char *str) static void rawlog_add(RAWLOG_REC *rawlog, char *str)
{ {
if (rawlog->lines->length >= rawlog_lines && rawlog_lines > 0) { while (rawlog->lines->length >= rawlog_lines && rawlog_lines > 0) {
void *tmp = g_queue_pop_head(rawlog->lines); void *tmp = g_queue_pop_head(rawlog->lines);
g_free(tmp); g_free(tmp);
} }