fix from Jarle Greipsland <jarle@idt.unit.no> to deal with ut_line misprinting.

This commit is contained in:
cgd 1994-06-30 07:18:44 +00:00
parent 97e0e0acd1
commit 6a3b73440c
1 changed files with 2 additions and 1 deletions

View File

@ -307,7 +307,8 @@ main(argc, argv)
p = hp->h_name;
}
if (x) {
(void)snprintf(buf, sizeof(buf), "%s:%s", p, x);
(void)snprintf(buf, sizeof(buf), "%s:%.*s", p,
ep->utmp.ut_host + UT_HOSTSIZE - x, x);
p = buf;
}
(void)printf("%-*.*s %-2.2s %-*.*s ",