mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
parser: Fix 'consumed' accounting when switching encodings
This commit is contained in:
parent
c93679381c
commit
691a771956
@ -1109,6 +1109,7 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
|
|||||||
*/
|
*/
|
||||||
processed = input->cur - input->base;
|
processed = input->cur - input->base;
|
||||||
xmlBufShrink(in->buffer, processed);
|
xmlBufShrink(in->buffer, processed);
|
||||||
|
input->consumed += processed;
|
||||||
in->raw = in->buffer;
|
in->raw = in->buffer;
|
||||||
in->buffer = xmlBufCreate();
|
in->buffer = xmlBufCreate();
|
||||||
in->rawconsumed = processed;
|
in->rawconsumed = processed;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user