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

- parser.c: and Matt Sergeant found one in the XML push

parser (erroneous check I forgot to remove when I fixed the
  main parser).
Daniel
This commit is contained in:
Daniel Veillard
2001-03-12 21:11:21 +00:00
parent 68d7b67ada
commit 82ab81e92b
2 changed files with 6 additions and 18 deletions

View File

@ -7529,24 +7529,6 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
/*
* Very first chars read from the document flow.
*/
cur = ctxt->input->cur[0];
if (IS_BLANK(cur)) {
if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
ctxt->sax->setDocumentLocator(ctxt->userData,
&xmlDefaultSAXLocator);
ctxt->errNo = XML_ERR_DOCUMENT_START;
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,
"Extra spaces at the beginning of the document are not allowed\n");
ctxt->wellFormed = 0;
ctxt->disableSAX = 1;
SKIP_BLANKS;
ret++;
if (ctxt->input->buf == NULL)
avail = ctxt->input->length - (ctxt->input->cur - ctxt->input->base);
else
avail = ctxt->input->buf->buffer->use - (ctxt->input->cur - ctxt->input->base);
}
if (avail < 2)
goto done;