changeset 14745:61416f315d1c

[gaim-migrate @ 17502] This should fix the last crash. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 17 Oct 2006 21:46:09 +0000
parents ab10f1467acb
children 54ce6f592b01
files console/libgnt/gntentry.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/console/libgnt/gntentry.c	Tue Oct 17 20:44:05 2006 +0000
+++ b/console/libgnt/gntentry.c	Tue Oct 17 21:46:09 2006 +0000
@@ -370,9 +370,10 @@
 				if (entry->max && g_utf8_pointer_to_offset(entry->start, entry->end) >= entry->max)
 					continue;
 
-				if (entry->end - entry->start >= entry->buffer)
+				if (entry->end + len - entry->start >= entry->buffer)
 				{
-					char *tmp = g_strdup_printf(entry->start);
+					/* This will cause the buffer to grow */
+					char *tmp = g_strdup_printf("%s%*s", entry->start, len, "");
 					gnt_entry_set_text(entry, tmp);
 					g_free(tmp);
 				}