diff -r b7978b580c00 -r 635af13bbcdb plugins/spellchk.c --- a/plugins/spellchk.c Fri Apr 16 14:39:34 2004 +0000 +++ b/plugins/spellchk.c Fri Apr 16 14:58:10 2004 +0000 @@ -214,14 +214,16 @@ static void substitute(char **mes, int pos, int m, const char *text) { char *new = g_malloc(strlen(*mes) + strlen(text) + 1); + char *tmp; new[0] = 0; strncat(new, *mes, pos); strcat(new, text); strcat(new, &(*mes)[pos + m]); - g_free(*mes); + tmp = *mes; *mes = new; + g_free(tmp); } static GtkWidget *tree; @@ -388,8 +390,6 @@ plugin, GAIM_CALLBACK(substitute_words), NULL); gaim_signal_connect(conv_handle, "writing-chat-msg", plugin, GAIM_CALLBACK(substitute_words), NULL); - gaim_signal_connect(conv_handle, "sending-im-msg", - plugin, GAIM_CALLBACK(substitute_words), NULL); return TRUE; }