1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00

fixed bug #302302, nasty but the fix is rather simple. Daniel

* xinclude.c: fixed bug #302302, nasty but the fix is rather simple.
Daniel
This commit is contained in:
Daniel Veillard 2005-08-10 13:39:10 +00:00
parent ea7e4798c4
commit e0fd93f5d3
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,7 @@
Wed Aug 10 15:25:53 CEST 2005 Daniel Veillard <daniel@veillard.com>
* xinclude.c: fixed bug #302302, nasty but the fix is rather simple.
Wed Aug 10 11:59:46 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
* result/schemas/any6_1_0*: Added missing test results.

View File

@ -2303,7 +2303,7 @@ static int
xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) {
xmlNodePtr cur;
int ret = 0;
int i;
int i, start;
if ((doc == NULL) || (tree == NULL))
return(-1);
@ -2315,6 +2315,10 @@ xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) {
if (ret < 0)
return(-1);
}
if (tree)
start = ctxt->incNr;
else
start = ctxt->incBase;
/*
* First phase: lookup the elements in the document
@ -2355,7 +2359,7 @@ xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) {
/*
* Second Phase : collect the infosets fragments
*/
for (i = ctxt->incBase;i < ctxt->incNr; i++) {
for (i = start;i < ctxt->incNr; i++) {
xmlXIncludeLoadNode(ctxt, i);
ret++;
}