diff --git a/ChangeLog b/ChangeLog index 0b846458b..9e7569438 100644 --- a/ChangeLog +++ b/ChangeLog @@ -37,6 +37,13 @@ -defaultAction]): idem. ([UIxAppointmentEditor -viewAction]): idem. +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/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index d0d6a3bbc..6f2c2f0b9 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -431,7 +431,7 @@ _occurenceHasID (iCalRepeatableEntityObject *occurence, NSString *recID) [currentComponent removeAllExceptionDates]; for (count = 0; count < max; count++) [currentComponent addToExceptionDates: [newDates objectAtIndex: count]]; - } + } } } 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))