Commit 44c00a9d authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Report an error if a file has no end-of-line but it should

Fix #726

This requires fixing a regtest
parent 309d7a55
......@@ -9,4 +9,3 @@
1.2300 0.0521 1.4068
1.2600 0.1120 2.6873
1.2900 0.2199 4.6183
1.3200 0.3948 7.1055
\ No newline at end of file
......@@ -237,6 +237,7 @@ IFile& IFile::getline(std::string &str) {
if(eof && noEOL) {
if(str.length()>0) eof=false;
} else if(eof || err || tmp!='\n') {
if(str.length()>0) plumed_merror("file " + getPath() + " is not allowed to have a non-terminated line. Please add a newline at the end of the file");
eof = true;
str="";
if(!err) fsetpos(fp,&pos);
......
Supports Markdown
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