fixed small problem with missing entities (test/ent2)
* parser.c: fixed small problem with missing entities (test/ent2)
diff --git a/parser.c b/parser.c
index 501b55e..32531e0 100644
--- a/parser.c
+++ b/parser.c
@@ -5828,7 +5828,8 @@
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 @@
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;