From fcf3e8b01d4f71ef96a1c3759b2634629cebb46d Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Thu, 21 Sep 2017 11:04:42 +1000 Subject: [PATCH] ignore non numbers --- mail_menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mail_menu.c b/mail_menu.c index 4cd9d3a..6cdd159 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -2653,7 +2653,7 @@ void msg_conf_sub_bases() { s_printf(get_string(225)); s_readstring(buffer, 9); s_printf("\r\n"); - if (strlen(buffer) > 0) { + if (strlen(buffer) > 0 && buffer[0] >= '0' && buffer[0] <= '9') { toggle_area = atoi(buffer); msgbase_sub_unsub(gUser->cur_mail_conf, toggle_area); lines = 0; @@ -2668,7 +2668,7 @@ void msg_conf_sub_bases() { s_printf(get_string(225)); s_readstring(buffer, 9); s_printf("\r\n"); - if (strlen(buffer) > 0) { + if (strlen(buffer) > 0 && buffer[0] >= '0' && buffer[0] <= '9') { toggle_area = atoi(buffer); msgbase_sub_unsub(gUser->cur_mail_conf, toggle_area); lines = 0;