Skip to content

Commit f383f46

Browse files
committed
Make 60-char output when the buffer is flushed at the end
1 parent dcd3658 commit f383f46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

consensus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ static void flush_fa_buffer(args_t *args, int len)
430430
{
431431
if ( !args->fa_buf.l ) return;
432432
int nwr = 0;
433-
while ( nwr + 60 <= args->fa_buf.l && args->fa_ori_pos + nwr + 60 < args->fa_frz_pos )
433+
while ( nwr + 60 <= args->fa_buf.l && (!len || args->fa_ori_pos + nwr + 60 < args->fa_frz_pos) )
434434
{
435435
if ( fwrite(args->fa_buf.s+nwr,1,60,args->fp_out) != 60 ) error("Could not write: %s\n", args->output_fname);
436436
if ( fwrite("\n",1,1,args->fp_out) != 1 ) error("Could not write: %s\n", args->output_fname);

0 commit comments

Comments
 (0)