Applied fix for bug #123481 reported by Peter Derr Daniel
* xmlreader.c: Applied fix for bug #123481 reported by Peter Derr
Daniel
diff --git a/ChangeLog b/ChangeLog
index 22611e9..7ba63d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Oct 1 11:03:40 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: Applied fix for bug #123481 reported by Peter Derr
+
Tue Sep 30 15:34:31 CEST 2003 Daniel Veillard <daniel@veillard.com>
* entities.c legacy.c parser.c: made the predefined entities
diff --git a/xmlreader.c b/xmlreader.c
index 662ee26..b4c9d70 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -1030,11 +1030,12 @@
if ((reader == NULL) || (reader->node == NULL) || (reader->ctxt == NULL))
return(-1);
-
do {
+ if (reader->ctxt->instate == XML_PARSER_EOF) return(1);
+
if (xmlTextReaderGetSuccessor(reader->node) != NULL)
return(1);
- if (reader->ctxt->nodeNr <= reader->depth)
+ if (reader->ctxt->nodeNr < reader->depth)
return(1);
if (reader->mode == XML_TEXTREADER_MODE_EOF)
return(1);