w: fixing missing '-' in the FROM field when empty
With 99bebff06a
a configurable
width of the FROM column was introduced. Unfortunately this
caused a regression in the dash printing. Hopefully fixed
with this commit.
This commit is contained in:
4
w.c
4
w.c
@ -100,6 +100,10 @@ static void print_host(const char *restrict host, int len, const int fromlen)
|
|||||||
* space-fill, and a '-' too if needed to ensure the
|
* space-fill, and a '-' too if needed to ensure the
|
||||||
* column exists
|
* column exists
|
||||||
*/
|
*/
|
||||||
|
if (!width) {
|
||||||
|
fputc('-', stdout);
|
||||||
|
++width;
|
||||||
|
}
|
||||||
while (width++ < fromlen)
|
while (width++ < fromlen)
|
||||||
fputc(' ', stdout);
|
fputc(' ', stdout);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user