Commit 03d426b2 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'fix-endless-loop' into 'master'

FileManager: Avoid endless loop on invalid files

See merge request !41
parents 2354de4c f47d8894
Pipeline #8646 passed with stage
in 4 minutes and 9 seconds
......@@ -154,7 +154,7 @@ bool FileManager::isHexahedralMesh(const std::string& _filename) const {
unsigned int n = 0u;
// Skip until we find polyhedra section
while (true || !iff.eof()) {
while (iff.good()) {
iff >> s;
if (s == "Polyhedra") {
break;
......@@ -200,7 +200,7 @@ bool FileManager::isTetrahedralMesh(const std::string& _filename) const {
unsigned int n = 0u;
// Skip until we find polyhedra section
while (true || !iff.eof()) {
while (iff.good()) {
iff >> s;
if (s == "Polyhedra") {
break;
......
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