Fix error with whitespace at end of file

The VTK file reader caused an error to be thrown when reading a file
that had a METADATA section at the end of the file. The problem was that
the METADATA section had some whitespace after its last line (which is
probably typical). This caused an eof check to pass and then a
subsequent search for a token to fail.

The solution was to eat the whitespace after the METADATA section to get
the reader at the next token or in eof condition if it is at the end of
the file.
This commit is contained in:
Kenneth Moreland 2019-09-25 16:20:20 -06:00
parent 9a906e4cbf
commit 82a58c2f0a

@ -980,6 +980,9 @@ protected:
{
std::getline(this->DataFile->Stream, line);
} while (this->DataFile->Stream.good() && !line.empty());
// Eat any remaining whitespace after the INFORMATION to be ready to read the next token
this->DataFile->Stream >> std::ws;
}
}
else