1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

applied Peter Jacobi encoding cleanup patch, and also avoided a possible

* parser.c parserInternals.c tree.c: applied Peter Jacobi encoding
  cleanup patch, and also avoided a possible memory leak
Daniel
This commit is contained in:
Daniel Veillard
2003-07-29 16:47:24 +00:00
parent 9ff7de14ae
commit a6874ca47c
4 changed files with 19 additions and 60 deletions

View File

@ -1780,13 +1780,13 @@ xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler)
/*
* "UTF-16" can be used for both LE and BE
*/
if ((!xmlStrncmp(BAD_CAST ctxt->input->buf->encoder->name,
BAD_CAST "UTF-16", 6)) &&
(!xmlStrncmp(BAD_CAST handler->name,
BAD_CAST "UTF-16", 6))) {
return(0);
}
*/
/*
* Note: this is a bit dangerous, but that's what it