From ab1230a94e04a95ed58c5a57bb97e56a121bef32 Mon Sep 17 00:00:00 2001 From: Jongkyu Koo Date: Thu, 13 Oct 2016 12:25:48 -0700 Subject: [PATCH] Revert "crash occured when downloading partial body" This reverts commit a1906a2158fac3bb6cff35a679b9d403787ebf50. Change-Id: I34e3bef3e34d259891ab68b3052682354a32579c --- email-core/email-core-mailbox-sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/email-core/email-core-mailbox-sync.c b/email-core/email-core-mailbox-sync.c index 116c083..859b2b0 100755 --- a/email-core/email-core-mailbox-sync.c +++ b/email-core/email-core-mailbox-sync.c @@ -3961,10 +3961,10 @@ static int emcore_gmime_download_imap_partial_mail_body(MAILSTREAM *stream, int 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; } -- 2.7.4