From 7970bd101ccafb270befb8222a15e07ec6fa50e3 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Tue, 11 Apr 1995 18:50:51 +0000 Subject: [PATCH] Fix output field range Submitted by: edward@edcom.com --- usr.bin/lastcomm/lastcomm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.bin/lastcomm/lastcomm.c b/usr.bin/lastcomm/lastcomm.c index 7c3c363b9bc..f8d90fc63ae 100644 --- a/usr.bin/lastcomm/lastcomm.c +++ b/usr.bin/lastcomm/lastcomm.c @@ -135,8 +135,9 @@ main(argc, argv) continue; t = expand(ab.ac_utime) + expand(ab.ac_stime); - (void)printf("%-*s %-7s %-*s %-*s %6.2f secs %.16s\n", - fldsiz(acct, ac_comm), ab.ac_comm, flagbits(ab.ac_flag), + (void)printf("%-*.*s %-7s %-*s %-*s %6.2f secs %.16s\n", + fldsiz(acct, ac_comm), fldsiz(acct, ac_comm), + ab.ac_comm, flagbits(ab.ac_flag), UT_NAMESIZE, user_from_uid(ab.ac_uid, 0), UT_LINESIZE, getdev(ab.ac_tty), t / (double)AHZ, ctime(&ab.ac_btime));