From 7e1437759cf4709ef5abcea5828c6cf94151ad88 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Fri, 1 Apr 2016 15:15:54 +1000 Subject: [PATCH] Fix crash on message list --- mail_menu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mail_menu.c b/mail_menu.c index dbe106c..01c1dcb 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -1169,6 +1169,9 @@ int mail_menu(int socket, struct user_record *user) { s_readstring(socket, buffer, 6); i = atoi(buffer); + if (i < 0) { + i = 0; + } closed = 0; s_putstring(socket, "\e[2J\e[1;37;44m[MSG#] Subject From To Date \r\n\e[0m");