From 27851ef4280812ce5bf53c1cce33318a4774cc6f Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Mon, 5 May 2014 01:51:18 +0200 Subject: [PATCH] openchange: FillMessageHeadersFromProperties fix skipping of last value in possible range of recepients IMHO, this fixes a bug, that when saving a meessage, it is saved without BCC fields. Signed-off-by: Kamen Mazdrashki --- OpenChange/MAPIStoreMailVolatileMessage.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenChange/MAPIStoreMailVolatileMessage.m b/OpenChange/MAPIStoreMailVolatileMessage.m index 58b4e66d2..73476bef7 100644 --- a/OpenChange/MAPIStoreMailVolatileMessage.m +++ b/OpenChange/MAPIStoreMailVolatileMessage.m @@ -541,7 +541,7 @@ FillMessageHeadersFromProperties (NGMutableHashMap *headers, NSArray *list; NSCalendarDate *date; NSDictionary *recipients; - NSUInteger type, bccLimit; + enum ulRecipClass type, bccLimit; SOGoUser *activeUser; NSNumber *priority; @@ -562,7 +562,7 @@ FillMessageHeadersFromProperties (NGMutableHashMap *headers, else bccLimit = MAPI_CC; bccLimit++; - for (type = MAPI_TO; type < bccLimit; type++) + for (type = MAPI_TO; type <= bccLimit; type++) { recId = recTypes[type]; list = MakeRecipientsList ([recipients objectForKey: recId]);