mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
reader: Fix error reporting with walker
Abort earlier in xmlTextReaderRead if an error was raised.
This commit is contained in:
parent
a846719b9c
commit
16fb1028a2
@ -1199,16 +1199,16 @@ xmlTextReaderRead(xmlTextReaderPtr reader) {
|
||||
xmlTextReaderState oldstate = XML_TEXTREADER_START;
|
||||
xmlNodePtr oldnode = NULL;
|
||||
|
||||
|
||||
if (reader == NULL)
|
||||
return(-1);
|
||||
if (reader->state == XML_TEXTREADER_ERROR)
|
||||
return(-1);
|
||||
|
||||
reader->curnode = NULL;
|
||||
if (reader->doc != NULL)
|
||||
return(xmlTextReaderReadTree(reader));
|
||||
if (reader->ctxt == NULL)
|
||||
return(-1);
|
||||
if (reader->state == XML_TEXTREADER_ERROR)
|
||||
return(-1);
|
||||
|
||||
if (reader->mode == XML_TEXTREADER_MODE_INITIAL) {
|
||||
reader->mode = XML_TEXTREADER_MODE_INTERACTIVE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user