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:
Craig Small 2012-04-25 10:21:07 +10:00
parent dd87e4f48c
commit 9af478c13d

1
w.c
View File

@ -82,6 +82,7 @@ static void print_host(const char *restrict host, int len, const int fromlen)
len = fromlen;
last = host + len;
for (; host < last; host++) {
if (*host == '\0') break;
if (isprint(*host) && *host != ' ') {
fputc(*host, stdout);
++width;