Remove trailing - from w from column
Jaromir Capik discovered that the from column for w would print a trailing - for some types of hosts.
This commit is contained in:
parent
dd87e4f48c
commit
9af478c13d
1
w.c
1
w.c
@ -82,6 +82,7 @@ static void print_host(const char *restrict host, int len, const int fromlen)
|
|||||||
len = fromlen;
|
len = fromlen;
|
||||||
last = host + len;
|
last = host + len;
|
||||||
for (; host < last; host++) {
|
for (; host < last; host++) {
|
||||||
|
if (*host == '\0') break;
|
||||||
if (isprint(*host) && *host != ' ') {
|
if (isprint(*host) && *host != ' ') {
|
||||||
fputc(*host, stdout);
|
fputc(*host, stdout);
|
||||||
++width;
|
++width;
|
||||||
|
Loading…
Reference in New Issue
Block a user