column: fix leading space characters bug

The bug has been introduced during column(1) rewrite. The function
read_input() need to skip leading space only temporary to detect empty
lines, but the rest of the code has to use the original buffer (line).

Addresses: https://github.com/karelzak/util-linux/issues/575
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1560283
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2018-03-27 10:40:13 +02:00
parent 8bef60e497
commit 5b6fa60639
1 changed files with 1 additions and 1 deletions

View File

@ -452,7 +452,7 @@ static int read_input(struct column_control *ctl, FILE *fp)
if (!str || !*str)
continue;
wcs = mbs_to_wcs(str);
wcs = mbs_to_wcs(buf);
if (!wcs)
err(EXIT_FAILURE, _("read failed"));