]> git.ipfire.org Git - thirdparty/util-linux.git/commit
column: fix leading space characters bug
authorKarel Zak <kzak@redhat.com>
Tue, 27 Mar 2018 08:40:13 +0000 (10:40 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Jul 2018 14:01:06 +0000 (16:01 +0200)
commitf36494da8d3bed7074af27f9cf9c27427bee4d93
tree773b8f25974ca66ce70d5e7a06d17a5f3131d899
parentf50aee8f88c6a8564e084971b26c0e6979def1b8
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).
I've tried to fix one of the symptoms by 5c7b67fbbf41c973ca8d49b1e8bdba22dbb917aa
(alter), but this solution is unnecessary and too complex.

Changes:

* don't ignore leading space
* remove unnecessary stuff introduced by 5c7b67fbbf41c973ca8d49b1e8bdba22dbb917aa
* fix regression test with incorrect separator

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>
tests/expected/column/table-input-separator-space
tests/ts/column/table
text-utils/column.c