From c36b8d348e595352cf89aecf9a0529678cdb8d92 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Wed, 12 Sep 2018 10:16:07 +1000 Subject: [PATCH] Fix bug when removing areas --- src/users.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/users.c b/src/users.c index 2cf02a0..81da65a 100644 --- a/src/users.c +++ b/src/users.c @@ -552,18 +552,18 @@ struct user_record *check_user_pass(char *loginname, char *password) { exit(-1); } - if (user->cur_mail_conf > conf.mail_conference_count) { + if (user->cur_mail_conf >= conf.mail_conference_count) { user->cur_mail_conf = 0; } - if (user->cur_file_dir > conf.file_directory_count) { + if (user->cur_file_dir >= conf.file_directory_count) { user->cur_file_dir = 0; } - if (user->cur_mail_area > conf.mail_conferences[user->cur_mail_conf]->mail_area_count) { + if (user->cur_mail_area >= conf.mail_conferences[user->cur_mail_conf]->mail_area_count) { user->cur_mail_area = 0; } - if (user->cur_file_sub > conf.file_directories[user->cur_file_dir]->file_sub_count) { + if (user->cur_file_sub >= conf.file_directories[user->cur_file_dir]->file_sub_count) { user->cur_file_sub = 0; }