diff --git a/mail_menu.c b/mail_menu.c index 3b63f80..f12a8ed 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -826,12 +826,12 @@ void read_message(int socket, struct user_record *user, struct msg_headers *msgh s_putstring(socket, buffer); } else if (body[z] == 'A') { j = atoi(&body[ansi + 2]); - if (j == 0) { + if (j == 0 && ansi + 3 == z) { j = 1; } for (i=0;i= 0) { - s_putstring(socket, "\e[1A"); + s_putstring(socket, "\e[A"); lines--; } else { break; @@ -839,12 +839,12 @@ void read_message(int socket, struct user_record *user, struct msg_headers *msgh } } else if (body[z] == 'C') { j = atoi(&body[ansi + 2]); - if (j == 0) { + if (j == 0 && ansi + 3 == z) { j = 1; } for (i=0;i= 0) { - s_putstring(socket, "\e[1D"); + s_putstring(socket, "\e[D"); chars--; } else { break;