src/protocols/toc/toc.c

changeset 2343
d4b21c7f968e
parent 2334
d7e3a9fe4a71
child 2371
3dcdd158010d
equal deleted inserted replaced
2342:7d51dd1e2194 2343:d4b21c7f968e
845 } 845 }
846 846
847 static int toc_send_im(struct gaim_connection *gc, char *name, char *message, int flags) 847 static int toc_send_im(struct gaim_connection *gc, char *name, char *message, int flags)
848 { 848 {
849 char buf[BUF_LEN * 2]; 849 char buf[BUF_LEN * 2];
850 char *tmp = g_malloc(strlen(message) * 2); 850 char *tmp = g_malloc(strlen(message) * 4 + 1); /* 4 because \n gets replaced with <BR> */
851 851
852 strcpy(tmp, message); 852 strcpy(tmp, message);
853 escape_text(tmp); 853 escape_text(tmp);
854 if (strlen(tmp) + 52 > MSG_LEN) { 854 if (strlen(tmp) + 52 > MSG_LEN) {
855 g_free(tmp); 855 g_free(tmp);

mercurial