diff --git a/utils/idftools/idf_helpers.cpp b/utils/idftools/idf_helpers.cpp index 798ea0c058..a9ab11e409 100644 --- a/utils/idftools/idf_helpers.cpp +++ b/utils/idftools/idf_helpers.cpp @@ -37,7 +37,7 @@ bool IDF3::FetchIDFLine( std::ifstream& aModel, std::string& aLine, bool& isComm aLine = ""; aFilePos = aModel.tellg(); - if( aFilePos == -1 ) + if( aModel.fail() ) return false; std::getline( aModel, aLine );