diff src/protocols/msn/switchboard.c @ 6358:8ba58b296cc1

[gaim-migrate @ 6862] This should fix a problem I encountered when I realized again that Qt sucks and likes to crash when I have certain tags not closed. The format string conversion code in MSN was taken from the old MSN prpl, and that code didn't close tags. This should fix that problem. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 03 Aug 2003 02:16:15 +0000
parents 82e7eaa67406
children 42fdf16f1dad
line wrap: on
line diff
--- a/src/protocols/msn/switchboard.c	Sat Aug 02 15:27:00 2003 +0000
+++ b/src/protocols/msn/switchboard.c	Sun Aug 03 02:16:15 2003 +0000
@@ -293,7 +293,6 @@
 	MsnSwitchBoard *swboard = servconn->data;
 	char *body;
 	const char *value;
-	char *format;
 	int flags = 0;
 
 	body = g_strdup(msn_message_get_body(msg));
@@ -309,9 +308,14 @@
 	}
 
 	if ((value = msn_message_get_attr(msg, "X-MMS-IM-Format")) != NULL) {
-		format = msn_parse_format(value);
+		char *pre_format, *post_format;
+
+		msn_parse_format(value, &pre_format, &post_format);
 
-		body = g_strdup_printf("%s%s", format, body);
+		body = g_strdup_printf("%s%s%s", pre_format, body, post_format);
+
+		g_free(pre_format);
+		g_free(post_format);
 	}
 
 	if (swboard->chat != NULL)