From 599cd14925e0d0c7698ac19c952014c7fde187bf Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 30 Dec 2008 20:20:41 +0000 Subject: [PATCH 1/2] Monotone-Parent: 34b0098e2e34111ae63e0f056fceabfd7cb1362e Monotone-Revision: 22aa1cec549d6f3ee5d911534369beaf41910226 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-12-30T20:20:41 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ UI/Scheduler/UIxCalListingActions.m | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c0094e50..338b3fad3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-30 Wolfgang Sourdeau + + * UI/Scheduler/UIxCalListingActions.m ([UIxCalListingActions + -eventsBlocksAction]): fixed a crash occuring in the rare + situation where an event end date would be inferior than its start + date. + 2008-12-23 Ludovic Marcotte * SoObjects/Appointments/SOGoAppointmentFolder.{h,m} diff --git a/UI/Scheduler/UIxCalListingActions.m b/UI/Scheduler/UIxCalListingActions.m index a0751c4f5..3ef5c0eea 100644 --- a/UI/Scheduler/UIxCalListingActions.m +++ b/UI/Scheduler/UIxCalListingActions.m @@ -371,8 +371,14 @@ static inline void _feedBlockWithDayBasedData(NSMutableDictionary *block, unsigned int start, unsigned int end, unsigned int dayStart) { - unsigned int delta, quarterStart, length; - + unsigned int delta, quarterStart, length, swap; + + if (start > end) + { + swap = end; + end = start; + start = swap; + } quarterStart = (start - dayStart) / quarterLength; delta = end - dayStart; if ((delta % quarterLength)) From 024a567d1af5e154cb00be795f4179afdcf9245a Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 31 Dec 2008 02:57:54 +0000 Subject: [PATCH 2/2] Monotone-Parent: 22aa1cec549d6f3ee5d911534369beaf41910226 Monotone-Revision: be94621e6c7d7ae0610925c213a0fc8f46eb30e9 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-12-31T02:57:54 Monotone-Branch: ca.inverse.sogo --- SoObjects/Appointments/SOGoCalendarComponent.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index 0ca0f4b94..f6826c5f6 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -430,7 +430,7 @@ _occurenceHasID (iCalRepeatableEntityObject *occurence, NSString *recID) [currentComponent removeAllExceptionDates]; for (count = 0; count < max; count++) [currentComponent addToExceptionDates: [newDates objectAtIndex: count]]; - } + } } }