comparison src/protocols/oscar/oscar.c @ 9638:201c8fe4cee3

[gaim-migrate @ 10486] This should fix the bogus bogus profile messages committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Mon, 02 Aug 2004 02:09:35 +0000
parents 10f1d729c415
children 58625ebfe03a
comparison
equal deleted inserted replaced
9637:6c44a5d7cf54 9638:201c8fe4cee3
392 * we have been unable to convert the text to utf-8 from the encoding 392 * we have been unable to convert the text to utf-8 from the encoding
393 * that was specified. So we check if the text is valid utf-8 then 393 * that was specified. So we check if the text is valid utf-8 then
394 * just copy it. 394 * just copy it.
395 */ 395 */
396 if (utf8 == NULL) { 396 if (utf8 == NULL) {
397 if (!g_utf8_validate(text, textlen, NULL)) 397 if (textlen != 0 && *text != '\0'
398 && !g_utf8_validate(text, textlen, NULL))
398 utf8 = g_strdup(_("(There was an error converting this message. The buddy you are speaking to most likely has a buggy client.)")); 399 utf8 = g_strdup(_("(There was an error converting this message. The buddy you are speaking to most likely has a buggy client.)"));
399 else 400 else
400 utf8 = g_strndup(text, textlen); 401 utf8 = g_strndup(text, textlen);
401 } 402 }
402 403