fixed 'unwanted empty line problem of mlog-files' see MUSR-95

This commit is contained in:
nemu
2009-10-16 07:04:16 +00:00
parent dca470e7bf
commit c3aebf04d6

View File

@ -876,7 +876,11 @@ int PMsrHandler::WriteMsrLogFile(const bool messages)
cout << endl << "*** FIT DID NOT CONVERGE ***" << endl; cout << endl << "*** FIT DID NOT CONVERGE ***" << endl;
} }
} else { } else {
fout << str.Data() << endl; if (str.Length() > 0)
fout << str.Data() << endl;
else // only write endl if not eof is reached. This is preventing growing msr-files, i.e. more and more empty lines at the end of the file
if (!fin.eof())
fout << endl;
} }
break; break;
default: default: