fixed small problem with missing entities (test/ent2)

* parser.c: fixed small problem with missing entities (test/ent2)
This commit is contained in:
William M. Brack 2003-09-27 01:05:55 +00:00
parent 9d8c1dfbb3
commit b670e2ebbe
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,7 @@
Fri Sep 26 18:03:42 PDT 2003 William Brack <wbrack@mmm.com.hk>
* parser.c: fixed small problem with missing entities (test/ent2)
Sat Sep 27 01:25:39 CEST 2003 Daniel Veillard <daniel@veillard.com>
* parser.c: William's change allowed to spot a nasty bug in xmlDoRead

View File

@ -5828,7 +5828,8 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
xmlFreeNodeList(list);
list = NULL;
}
} else if (ret > 0) {
} else if ((ret != XML_ERR_OK) &&
(ret != XML_WAR_UNDECLARED_ENTITY)) {
xmlFatalErr(ctxt, ret, NULL);
} else if (list != NULL) {
xmlFreeNodeList(list);
@ -10666,7 +10667,7 @@ xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt,
ctxt = xmlCreateEntityParserCtxt(URL, ID, NULL);
if (ctxt == NULL) return(-1);
if (ctxt == NULL) return(XML_WAR_UNDECLARED_ENTITY);
ctxt->userData = ctxt;
if (oldctxt != NULL) {
ctxt->_private = oldctxt->_private;