Commit 82b66694 authored by Jan Möbius's avatar Jan Möbius

OpenMesh obj reader fix ( )

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@74 fdac6126-5c0c-442c-9429-916003d36597
parent 53b2d16c
......@@ -391,6 +391,9 @@ read(std::fstream& _in, BaseImporter& _bi, Options& _opt)
std::stringstream tmp( vertex );
tmp >> value;
// Clear vertex after finished reading the line
vertex="";
// Nothing to read here ( garbage at end of line )
if ( tmp.fail() ) {
continue;
......@@ -432,7 +435,8 @@ read(std::fstream& _in, BaseImporter& _bi, Options& _opt)
// Prepare for reading next component
++component;
} while ( vertex.find("/") != std::string::npos );
// Read until line does not contain any other info
} while ( !vertex.empty() );
component = 0;
nV++;
......
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