Hello,
I am wondering if I declare a array of chars like this.
I am clearing the array before I fill it by using one of the following. By setting the first char to zero:Code:static char xml_buffer[1024];
or is this preferred?Code:xml_buffer[0] = 0;
However, the problem is when I fill the buffer I don't think the null is being inserted at the end of the string.Code:memset(xml_buffer, 0, sizeof(xml_buffer));
I am using a xml parser that will fill the buffer.
I don't think the null is being automatically appended and the documentation doesn't specify either? Could be I am not clearing the buffer, or is there any way to do this manually?Code:success = xmlFillString(tree, xml_buffer, sizeof(xml_buffer), XML_NO_CALLBACK);
Many thanks,



LinkBack URL
About LinkBacks


