diff src/protocols/toc/toc.c @ 3188:49fb2b634a2a

[gaim-migrate @ 3205] The Robot101 commit. A toc fix (don't use toc) and the possibility to compile iconaway.c on an applet and use it on the standalone app. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sat, 27 Apr 2002 19:41:07 +0000
parents fce1883cc608
children 8fa61405af2b
line wrap: on
line diff
--- a/src/protocols/toc/toc.c	Sat Apr 27 07:43:53 2002 +0000
+++ b/src/protocols/toc/toc.c	Sat Apr 27 19:41:07 2002 +0000
@@ -1003,9 +1003,12 @@
 		g_free (g->away);
 	g->away = NULL;
 	if (message) {
+		char *tmp = g_malloc(strlen(message) * 4 + 1);
+		strcpy(tmp, message);
 		g->away = g_strdup (message);
-		escape_text(message);
-		g_snprintf(buf, MSG_LEN, "toc_set_away \"%s\"", message);
+		escape_text(tmp);
+		g_snprintf(buf, MSG_LEN, "toc_set_away \"%s\"", tmp);
+		g_free(tmp);
 	} else
 		g_snprintf(buf, MSG_LEN, "toc_set_away \"\"");
 	sflap_send(g, buf, -1, TYPE_DATA);