Skip to content

Commit

Permalink
column: fix leading space characters bug
Browse files Browse the repository at this point in the history
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: #575
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1560283
Signed-off-by: Karel Zak <kzak@redhat.com>
  • Loading branch information
karelzak committed Mar 27, 2018
1 parent 8bef60e commit 5b6fa60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion text-utils/column.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"));

Expand Down

0 comments on commit 5b6fa60

Please sign in to comment.