if (!(imap_response[i].bodystructure) || imap_response[i].bodystructure_len <= 0) continue;
/* Search the account id of pbd_event */
- for (temp_count = 0; temp_count < item_count && pbd_event[temp_count].server_mail_id != imap_response[i].uid_no; temp_count++)
+ for (temp_count = 0; temp_count <= item_count && pbd_event[temp_count].server_mail_id != imap_response[i].uid_no; temp_count++)
continue;
- if (temp_count >= item_count) {
+ if (temp_count > item_count) {
EM_DEBUG_EXCEPTION("Can't find proper server_mail_id");
goto FINISH_OFF;
}