Skip to content
Snippets Groups Projects
Commit ed2445f7 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Fix potential bug (detected by valgrind)

parent 0f960861
No related branches found
No related tags found
No related merge requests found
......@@ -523,7 +523,7 @@ PlumedIFile& PlumedIFile::getline(std::string &str){
while(llread(&tmp,1)==1 && tmp && tmp!='\n' && !eof && !err){
str+=tmp;
}
if(tmp!='\n' || err){
if(err || eof || tmp!='\n'){
eof = true;
str="";
fsetpos(fp,&pos);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment