Bugfix: the header line was ending with a separator.

Test baselines needed adaption as well.
This commit is contained in:
Robin Sommer 2011-03-09 16:55:29 -08:00
parent b69ecff3ee
commit 52c54859b6
18 changed files with 107 additions and 107 deletions

View file

@ -60,11 +60,11 @@ bool LogWriterAscii::DoInit(string path, int num_fields, const LogField* const *
for ( int i = 0; i < num_fields; i++ )
{
const LogField* field = fields[i];
if ( fputs(field->name.c_str(), file) == EOF )
if ( i > 0 && fwrite(separator, separator_len, 1, file) != 1 )
goto write_error;
if ( fwrite(separator, separator_len, 1, file) != 1 )
const LogField* field = fields[i];
if ( fputs(field->name.c_str(), file) == EOF )
goto write_error;
}