Skip to content

Commit

Permalink
Fix UNV file read which was broken due to missing cards
Browse files Browse the repository at this point in the history
  • Loading branch information
vejmarie authored and wwmayer committed Jul 15, 2016
1 parent 849704c commit 8051d32
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/3rdParty/salomesmesh/inc/UNV_Utilities.hxx
Expand Up @@ -60,7 +60,7 @@ namespace UNV{
std::string olds, news;

in_file.seekg(0);
while(true)
while(!in_file.eof() && !in_file.fail())
{
in_file >> olds >> news;
/*
Expand All @@ -81,7 +81,9 @@ namespace UNV{
if (news == ds_name)
return true;
}
// should never end up here
// We didn't found the card
// Let's rewind the file handler and return an error
in_file.clear();
return false;
}

Expand Down

0 comments on commit 8051d32

Please sign in to comment.