diff src/gtkimhtml.c @ 8250:b248c1f4efbd

[gaim-migrate @ 8973] 1) Minor changes to the network listen code again. Tim, let me know if you have any other suggestions. 2) Changed how charsets are handled in oscar a tad bit. I think this should guarantee that Gaim doesn't crash when people send funky messages, or have funky away messages or really anything that is using a charset that isn't utf8, iso-8859-1, ucs-2be, or ascii. Ethan, this should fix the problem with that person's away message. Although, the message itself still looks kinda funky to me. The encoding is Windows-31J, which is apparently a valid iconv encoding? You would know more than I. 3) Fix the following crash: 1. IM yourself a message on AIM 2. Do NOT begin to type a second message, but instead hit CTRL+up committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 13 Feb 2004 05:37:12 +0000
parents 4e68644a47f6
children f694277e8341
line wrap: on
line diff
--- a/src/gtkimhtml.c	Thu Feb 12 23:51:39 2004 +0000
+++ b/src/gtkimhtml.c	Fri Feb 13 05:37:12 2004 +0000
@@ -2428,7 +2428,7 @@
 		span->end = gtk_text_buffer_create_mark(imhtml->text_buffer, NULL, &iter, TRUE);
 	}
 	if (size != -1) {
-		span = g_malloc(sizeof(GtkIMHtmlFormatSpan));
+		span = g_malloc0(sizeof(GtkIMHtmlFormatSpan));
 		span->start = gtk_text_buffer_create_mark(imhtml->text_buffer, NULL, &iter, TRUE);
 		span->end = NULL;
 		span->buffer = imhtml->text_buffer;
@@ -2458,7 +2458,7 @@
 		span->end = gtk_text_buffer_create_mark(imhtml->text_buffer, NULL, &iter, TRUE);
 	}
 
-	span = g_malloc(sizeof(GtkIMHtmlFormatSpan));
+	span = g_malloc0(sizeof(GtkIMHtmlFormatSpan));
 	span->start = gtk_text_buffer_create_mark(imhtml->text_buffer, NULL, &iter, TRUE);
 	span->end = NULL;
 	span->buffer = imhtml->text_buffer;
@@ -2487,7 +2487,7 @@
 		span->end = gtk_text_buffer_create_mark(imhtml->text_buffer, NULL, &iter, TRUE);
 	}
 
-	span = g_malloc(sizeof(GtkIMHtmlFormatSpan));
+	span = g_malloc0(sizeof(GtkIMHtmlFormatSpan));
 	span->start = gtk_text_buffer_create_mark(imhtml->text_buffer, NULL, &iter, TRUE);
 	span->end = NULL;
 	span->tag = NULL;