changeset 2954:f6c4f2187c08

[gaim-migrate @ 2967] Bye bye bug. There you go, Sean. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 10 Feb 2002 22:36:18 +0000
parents fa76b0156259
children 8b03506b8c1e
files src/gtkimhtml.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkimhtml.c	Thu Feb 07 01:44:05 2002 +0000
+++ b/src/gtkimhtml.c	Sun Feb 10 22:36:18 2002 +0000
@@ -2345,9 +2345,10 @@
 	g_return_if_fail (GTK_IS_IMHTML (imhtml));
 	g_return_if_fail (bit != NULL);
 
-	if ( (bit->type == TYPE_TEXT) ||
+	if ( ((bit->type == TYPE_TEXT) ||
 	    ((bit->type == TYPE_SMILEY) && !imhtml->smileys) ||
-	    ((bit->type == TYPE_COMMENT) && imhtml->comments)) {
+	    ((bit->type == TYPE_COMMENT) && imhtml->comments)) &&
+	     bit->text) {
 		gchar *copy = g_strdup (bit->text);
 		gint pos = 0;
 		gboolean seenspace = FALSE;
@@ -2764,7 +2765,7 @@
 	VALID_OPT_TAG ("H3");
 
 	if (!g_strncasecmp(string, "!--", strlen ("!--"))) {
-		gchar *e = strstr (string, "-->");
+		gchar *e = strstr (string + strlen("!--"), "-->");
 		if (e) {
 			*len = e - string + strlen ("-->");
 			*tag = g_strndup (string + strlen ("!--"), *len - strlen ("!---->"));