libsmartcols: don't use fprintf() when count cells
fprintf("%*s") is based on bytes, no cells. Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
df73852b6e
commit
05c1123bc3
|
@ -343,7 +343,9 @@ static int print_data(struct libscols_table *tb,
|
|||
size_t xw = cl->width;
|
||||
if (color)
|
||||
fputs(color, tb->out);
|
||||
fprintf(tb->out, "%*s", (int) xw, data);
|
||||
for (i = len; i < width; i++)
|
||||
fputc(' ', tb->out);
|
||||
fputs(data, tb->out);
|
||||
if (color)
|
||||
fputs(UL_COLOR_RESET, tb->out);
|
||||
if (len < xw)
|
||||
|
|
Loading…
Reference in New Issue