From e54a8191041893705261e60354bce6eaa5d12340 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 15 Nov 2001 22:36:12 +0000 Subject: textbuffer_insert() didn't work properly when trying to add empty string. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2026 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/textbuffer.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/fe-text/textbuffer.c b/src/fe-text/textbuffer.c index b08e6fec..29527622 100644 --- a/src/fe-text/textbuffer.c +++ b/src/fe-text/textbuffer.c @@ -277,6 +277,9 @@ LINE_REC *textbuffer_insert(TEXT_BUFFER_REC *buffer, LINE_REC *insert_after, g_return_val_if_fail(buffer != NULL, NULL); g_return_val_if_fail(data != NULL, NULL); + if (len == 0) + return insert_after; + line = !buffer->last_eol ? insert_after : textbuffer_line_insert(buffer, insert_after); -- cgit v1.2.3