mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-09 04:58:16 +03:00
Fix unwanted warnings when switching encodings
Revert part of commit 46dc989 "Don't switch encoding for internal parameter entities" that caused spurious warnings. Fixes bug 786267.
This commit is contained in:
parent
27f310d453
commit
3aca7f31cb
@ -1235,7 +1235,11 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
|
||||
input->buf->rawconsumed += use - xmlBufUse(input->buf->raw);
|
||||
}
|
||||
return (0);
|
||||
} else {
|
||||
} else if (input->length == 0) {
|
||||
/*
|
||||
* When parsing a static memory array one must know the
|
||||
* size to be able to convert the buffer.
|
||||
*/
|
||||
xmlErrInternal(ctxt, "switching encoding : no input\n", NULL);
|
||||
return (-1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user