Skip to content
Snippets Groups Projects
Commit 2d97490e authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Added missing check to the VTKReader

parent e3b58a6b
No related branches found
No related tags found
No related merge requests found
......@@ -419,6 +419,8 @@ protected:
// check header
getline( str, line );
static const std::string prefix = "# vtk DataFile Version ";
if( line.size() < prefix.size() )
throw MeshReaderError( "VTKReader", "failed to parse the VTK file header: unsupported VTK header '" + line + "'" );
formatVersion = line.substr( prefix.length() );
if( line.substr( 0, prefix.length() ) != prefix )
throw MeshReaderError( "VTKReader", "failed to parse the VTK file header: unsupported VTK header '" + line + "'" );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment