(Calendar) Limit event block size to a day

pull/259/head
Francis Lachapelle 2019-09-24 14:45:53 -04:00
parent 2077a8707f
commit 3100ac1e9c
1 changed files with 2 additions and 0 deletions

View File

@ -958,6 +958,8 @@ static inline void _feedBlockWithDayBasedData (NSMutableDictionary *block, unsig
}
quarterStart = (start - dayStart) / quarterLength;
delta = end - dayStart;
if (delta > dayLength)
delta = dayLength;
if ((delta % quarterLength))
delta += quarterLength;
length = (delta / quarterLength) - quarterStart;