mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-13 20:58:16 +03:00
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
This commit is contained in:
parent
e1631e1cfc
commit
8e2098aef7
16
xmlIO.c
16
xmlIO.c
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user