Commit 8e2098ae authored by Mikhail Titov's avatar Mikhail Titov Committed by Daniel Veillard

Fix an output buffer flushing conversion bug

for https://bugzilla.gnome.org/show_bug.cgi?id=694982
On a flush operation, everything must be converted
parent e1631e1c
......@@ -3725,14 +3725,16 @@ xmlOutputBufferFlush(xmlOutputBufferPtr out) {
*/
if ((out->conv != NULL) && (out->encoder != NULL)) {
/*
* convert as much as possible to the parser reading buffer.
* convert as much as possible to the parser output buffer.
*/
nbchars = xmlCharEncOutput(out, 0);
if (nbchars < 0) {
xmlIOErr(XML_IO_ENCODER, NULL);
out->error = XML_IO_ENCODER;
return(-1);
}
do {
nbchars = xmlCharEncOutput(out, 0);
if (nbchars < 0) {
xmlIOErr(XML_IO_ENCODER, NULL);
out->error = XML_IO_ENCODER;
return(-1);
}
} while (nbchars);
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment