Commit 52914a21 authored by Andy Cedilnik's avatar Andy Cedilnik

Improve parser, so that on parse error it stops parsing

parent 1af6b77c
......@@ -22,7 +22,7 @@
#include <ctype.h>
#include <sys/stat.h>
vtkCxxRevisionMacro(vtkXMLParser, "1.14");
vtkCxxRevisionMacro(vtkXMLParser, "1.15");
vtkStandardNewMacro(vtkXMLParser);
//----------------------------------------------------------------------------
......@@ -243,7 +243,7 @@ int vtkXMLParser::ParseXML()
// to not check the error condition on the fin.read() before using
// the data, but the fin.gcount() will be zero if an error occurred.
// Therefore, the loop should be safe everywhere.
while(!this->ParsingComplete() && in)
while(!this->ParseError && !this->ParsingComplete() && in)
{
in.read(buffer, bufferSize);
if(in.gcount())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment