diff --git a/calendar/libical/src/libical/icalrecur.c b/calendar/libical/src/libical/icalrecur.c index f885c80199c..25a50c4cbd6 100644 --- a/calendar/libical/src/libical/icalrecur.c +++ b/calendar/libical/src/libical/icalrecur.c @@ -493,15 +493,15 @@ struct icalrecurrencetype icalrecurrencetype_from_string(const char* str) static struct { char* str;size_t offset; int limit; } recurmap[] = { - {";BYSECOND=",offsetof(struct icalrecurrencetype,by_second),60}, - {";BYMINUTE=",offsetof(struct icalrecurrencetype,by_minute),60}, - {";BYHOUR=",offsetof(struct icalrecurrencetype,by_hour),24}, - {";BYDAY=",offsetof(struct icalrecurrencetype,by_day),7}, - {";BYMONTHDAY=",offsetof(struct icalrecurrencetype,by_month_day),31}, - {";BYYEARDAY=",offsetof(struct icalrecurrencetype,by_year_day),366}, - {";BYWEEKNO=",offsetof(struct icalrecurrencetype,by_week_no),52}, - {";BYMONTH=",offsetof(struct icalrecurrencetype,by_month),12}, - {";BYSETPOS=",offsetof(struct icalrecurrencetype,by_set_pos),366}, + {";BYSECOND=",offsetof(struct icalrecurrencetype,by_second),ICAL_BY_SECOND_SIZE - 1}, + {";BYMINUTE=",offsetof(struct icalrecurrencetype,by_minute),ICAL_BY_MINUTE_SIZE - 1}, + {";BYHOUR=",offsetof(struct icalrecurrencetype,by_hour),ICAL_BY_HOUR_SIZE - 1}, + {";BYDAY=",offsetof(struct icalrecurrencetype,by_day),ICAL_BY_DAY_SIZE - 1}, + {";BYMONTHDAY=",offsetof(struct icalrecurrencetype,by_month_day),ICAL_BY_MONTHDAY_SIZE - 1}, + {";BYYEARDAY=",offsetof(struct icalrecurrencetype,by_year_day),ICAL_BY_YEARDAY_SIZE - 1}, + {";BYWEEKNO=",offsetof(struct icalrecurrencetype,by_week_no),ICAL_BY_WEEKNO_SIZE - 1}, + {";BYMONTH=",offsetof(struct icalrecurrencetype,by_month),ICAL_BY_MONTH_SIZE - 1}, + {";BYSETPOS=",offsetof(struct icalrecurrencetype,by_set_pos),ICAL_BY_SETPOS_SIZE - 1}, {0,0,0}, };