Mercurial > pidgin.yaz
diff src/protocols/msn/msg.c @ 6826:2adf21e70601
[gaim-migrate @ 7371]
Fixed message length problems for binary and text.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 13 Sep 2003 23:28:08 +0000 |
parents | 8f228a7d5076 |
children | 1cfbb731aa1f |
line wrap: on
line diff
--- a/src/protocols/msn/msg.c Sat Sep 13 21:01:26 2003 +0000 +++ b/src/protocols/msn/msg.c Sat Sep 13 23:28:08 2003 +0000 @@ -298,7 +298,7 @@ } char * -msn_message_build_string(const MsnMessage *msg) +msn_message_to_string(const MsnMessage *msg, size_t *ret_size) { GList *l; char *msg_start; @@ -332,7 +332,7 @@ len = strlen(buf) + msg->size + 1; - str = g_new0(char, len); + str = g_new0(char, len + 1); g_strlcpy(str, buf, len); @@ -434,6 +434,9 @@ } } + if (ret_size != NULL) + *ret_size = len - 1; + return str; }