From 477bcfac3123a9b96644a21304357d6a1f1098cd Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sat, 23 Apr 2016 15:11:08 +1000 Subject: [PATCH] Add precision to msg header to chop them off --- mail_menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mail_menu.c b/mail_menu.c index 639d85a..43b8391 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -750,9 +750,9 @@ void read_message(int socket, struct user_record *user, struct msg_headers *msgh sprintf(buffer, "\e[2J\e[1;32mFrom : \e[1;37m%s\r\n", msghs->msgs[mailno]->from); } s_putstring(socket, buffer); - sprintf(buffer, "\e[1;32mTo : \e[1;37m%-27s \e[1;32mArea : \e[1;37m%-27s\r\n", msghs->msgs[mailno]->to, conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->name); + sprintf(buffer, "\e[1;32mTo : \e[1;37m%-27.27s \e[1;32mArea : \e[1;37m%-27.27s\r\n", msghs->msgs[mailno]->to, conf.mail_conferences[user->cur_mail_conf]->mail_areas[user->cur_mail_area]->name); s_putstring(socket, buffer); - sprintf(buffer, "\e[1;32mSubject : \e[1;37m%-27s \e[1;32mMsgNo : \e[1;37m%4d of %4d\r\n", msghs->msgs[mailno]->subject, mailno, msghs->msg_count); + sprintf(buffer, "\e[1;32mSubject : \e[1;37m%-27.27s \e[1;32mMsgNo : \e[1;37m%4d of %4d\r\n", msghs->msgs[mailno]->subject, mailno, msghs->msg_count); s_putstring(socket, buffer); localtime_r((time_t *)&msghs->msgs[mailno]->msg_h->DateWritten, &msg_date); sprintf(buffer, "\e[1;32mDate : \e[1;37m%s", asctime(&msg_date));