Mercurial > pidgin
diff src/protocols/oscar/oscar.c @ 9919:1806abd8ccbc
[gaim-migrate @ 10811]
Jimmy Eat World is The Good.
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Tue, 31 Aug 2004 03:37:27 +0000 |
| parents | e74eb0d11f86 |
| children | fb08a0973b3e |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Tue Aug 31 01:58:52 2004 +0000 +++ b/src/protocols/oscar/oscar.c Tue Aug 31 03:37:27 2004 +0000 @@ -3611,8 +3611,16 @@ "Received a channel 4 message of type 0x%02hhx.\n", args->type); - /* Split up the message at the delimeter character, then convert each string to UTF-8 */ - msg1 = g_strsplit(args->msg, "\376", 0); + /* + * Split up the message at the delimeter character, then convert each + * string to UTF-8. Unless, of course, this is a type 1 message. If + * this is a type 1 message, then the delimiter 0xfe could be a valid + * character in whatever encoding the message was sent in. Type 1 + * messages are always made up of only one part, so we can easily account + * for this suck-ass part of the protocol by splitting the string into at + * most 1 baby string. + */ + msg1 = g_strsplit(args->msg, "\376", (args->type == 0x01 ? 1 : 0)); for (numtoks=0; msg1[numtoks]; numtoks++); msg2 = (gchar **)g_malloc((numtoks+1)*sizeof(gchar *)); for (i=0; msg1[i]; i++) {
