comparison libpurple/xmlnode.c @ 21955:feb92c44db87

Patch from QuLogic to correctly set the length. Closes #4515.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 29 Dec 2007 17:45:40 +0000
parents c0f6a658ad6b
children 774ef2a2e7f8 c4ec724b3b53 84c7bb2ca41f
comparison
equal deleted inserted replaced
21954:8eb1846b5c40 21955:feb92c44db87
549 549
550 xml = xmlnode_to_str_helper(node, len, TRUE, 0); 550 xml = xmlnode_to_str_helper(node, len, TRUE, 0);
551 xml_with_declaration = 551 xml_with_declaration =
552 g_strdup_printf("<?xml version='1.0' encoding='UTF-8' ?>" NEWLINE_S NEWLINE_S "%s", xml); 552 g_strdup_printf("<?xml version='1.0' encoding='UTF-8' ?>" NEWLINE_S NEWLINE_S "%s", xml);
553 g_free(xml); 553 g_free(xml);
554
555 if (len)
556 *len += sizeof("<?xml version='1.0' encoding='UTF-8' ?>" NEWLINE_S NEWLINE_S) - 1;
554 557
555 return xml_with_declaration; 558 return xml_with_declaration;
556 } 559 }
557 560
558 struct _xmlnode_parser_data { 561 struct _xmlnode_parser_data {