Mercurial > pidgin.yaz
diff src/protocols/msn/utils.c @ 9090:cab225a333b5
[gaim-migrate @ 9867]
On win32 (and possibly some other setups), any MSN messages with a comma in
it were causing a disconnect. Fixed!
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 27 May 2004 08:02:43 +0000 |
parents | 3ea82ab12cb9 |
children | 502707ca1836 |
line wrap: on
line diff
--- a/src/protocols/msn/utils.c Thu May 27 07:06:06 2004 +0000 +++ b/src/protocols/msn/utils.c Thu May 27 08:02:43 2004 +0000 @@ -251,7 +251,10 @@ end = strchr(c, '\"'); comma = strchr(c, ','); - namelen = (unsigned int)((comma != NULL ? comma : end) - c); + if (comma == NULL || comma > end) + namelen = (unsigned int)(end - c); + else + namelen = (unsigned int)(comma - c); fontface = g_strndup(c, namelen); c = end + 2;