From: Karel Zak Date: Tue, 6 Sep 2016 09:02:59 +0000 (+0200) Subject: libsmartcols: fix empty cell padding X-Git-Tag: v2.28.2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61a8670baadfde3c694c14391c013057fd11fd1e;p=thirdparty%2Futil-linux.git libsmartcols: fix empty cell padding The code does not print columns separator. Signed-off-by: Karel Zak --- diff --git a/libsmartcols/src/table_print.c b/libsmartcols/src/table_print.c index ba5eeccacc..8981f821c4 100644 --- a/libsmartcols/src/table_print.c +++ b/libsmartcols/src/table_print.c @@ -244,8 +244,11 @@ static void print_empty_cell(struct libscols_table *tb, } } /* fill rest of cell with space */ - for(; len_pad <= cl->width; ++len_pad) + for(; len_pad < cl->width; ++len_pad) fputc(' ', tb->out); + + if (!is_last_column(cl)) + fputs(colsep(tb), tb->out); }