diff src/protocols/msn/msn.c @ 3375:fb1a0caadb9f

[gaim-migrate @ 3394] A patch by Etan. A patch by Ben. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 05 Aug 2002 07:44:11 +0000
parents edc8511fddff
children 8fa61405af2b
line wrap: on
line diff
--- a/src/protocols/msn/msn.c	Mon Aug 05 07:33:09 2002 +0000
+++ b/src/protocols/msn/msn.c	Mon Aug 05 07:44:11 2002 +0000
@@ -587,7 +587,9 @@
 {
 	char *cur;
 	GString *ret = g_string_new(NULL);
-	char colors[3];
+	guint colorbuf;
+	char *colors = (char *)(&colorbuf);
+	
 
 	cur = strstr(mime, "FN=");
 	if (cur && (*(cur = cur + 3) != ';')) {
@@ -611,7 +613,7 @@
 	
 	cur = strstr(mime, "CO=");
 	if (cur && (*(cur = cur + 3) != ';')) {
-		if (sscanf (cur, "%x;", (int*)(&colors)) == 1) {
+		if (sscanf (cur, "%x;", &colorbuf) == 1) {
 			char tag[MSN_BUF_LEN];
 			g_snprintf(tag, sizeof(tag), "<FONT COLOR=\"#%02hhx%02hhx%02hhx\">", colors[0], colors[1], colors[2]);
 			ret = g_string_append(ret, tag);