From 2c84834cafebc4b72e6ddc5530484be695e803d8 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sat, 23 Apr 2016 20:46:25 +1000 Subject: [PATCH] Oops forgot to make the list 1 based --- mail_menu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mail_menu.c b/mail_menu.c index 6974930..22b0469 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -1295,7 +1295,7 @@ int mail_menu(int socket, struct user_record *user) { jlr.HighReadMsg = 0; } JAM_CloseMB(jb); - sprintf(buffer, "Read message [1-%d] or N for new: ", msghs->msg_count); + sprintf(buffer, "Read message [1-%d] or N for New: ", msghs->msg_count); s_putstring(socket, buffer); s_readstring(socket, buffer, 6); @@ -1620,9 +1620,9 @@ int mail_menu(int socket, struct user_record *user) { for (j=i-1;jmsg_count;j++) { localtime_r((time_t *)&msghs->msgs[j]->msg_h->DateWritten, &msg_date); if (msghs->msgs[j]->msg_no > jlr.HighReadMsg) { - sprintf(buffer, "\e[1;30m[\e[1;34m%4d\e[1;30m]\e[1;32m*\e[1;37m%-25.25s \e[1;32m%-15.15s \e[1;33m%-15.15s \e[1;35m%02d:%02d %02d-%02d-%02d\e[0m\r\n", j, msghs->msgs[j]->subject, msghs->msgs[j]->from, msghs->msgs[j]->to, msg_date.tm_hour, msg_date.tm_min, msg_date.tm_mday, msg_date.tm_mon + 1, msg_date.tm_year - 100); + sprintf(buffer, "\e[1;30m[\e[1;34m%4d\e[1;30m]\e[1;32m*\e[1;37m%-25.25s \e[1;32m%-15.15s \e[1;33m%-15.15s \e[1;35m%02d:%02d %02d-%02d-%02d\e[0m\r\n", j + 1, msghs->msgs[j]->subject, msghs->msgs[j]->from, msghs->msgs[j]->to, msg_date.tm_hour, msg_date.tm_min, msg_date.tm_mday, msg_date.tm_mon + 1, msg_date.tm_year - 100); } else { - sprintf(buffer, "\e[1;30m[\e[1;34m%4d\e[1;30m] \e[1;37m%-25.25s \e[1;32m%-15.15s \e[1;33m%-15.15s \e[1;35m%02d:%02d %02d-%02d-%02d\e[0m\r\n", j, msghs->msgs[j]->subject, msghs->msgs[j]->from, msghs->msgs[j]->to, msg_date.tm_hour, msg_date.tm_min, msg_date.tm_mday, msg_date.tm_mon + 1, msg_date.tm_year - 100); + sprintf(buffer, "\e[1;30m[\e[1;34m%4d\e[1;30m] \e[1;37m%-25.25s \e[1;32m%-15.15s \e[1;33m%-15.15s \e[1;35m%02d:%02d %02d-%02d-%02d\e[0m\r\n", j + 1, msghs->msgs[j]->subject, msghs->msgs[j]->from, msghs->msgs[j]->to, msg_date.tm_hour, msg_date.tm_min, msg_date.tm_mday, msg_date.tm_mon + 1, msg_date.tm_year - 100); } s_putstring(socket, buffer);