From 2dde14d96e580110ecd91b35d525db0db6649d92 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 12 Mar 2009 14:44:47 +0000 Subject: [PATCH] * Fixed a bug that caused the default recurrence for a new yearly event to be 'day/week/month' instead of 'day/month'. Needed to check for 0 values. --- webcit/event.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webcit/event.c b/webcit/event.c index 25ad1514a..9b54b6dfc 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -590,8 +590,12 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, int rrymonth = t_start.month; int which_rryeartype_is_preselected = 0; - if ( (recur.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX) - && (recur.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX) ) { + if ( + (recur.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX) + && (recur.by_day[0] != 0) + && (recur.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX) + && (recur.by_month[0] != 0) + ) { which_rryeartype_is_preselected = 1; rrymweek = icalrecurrencetype_day_position(recur.by_day[0]); rrymweekday = icalrecurrencetype_day_day_of_week(recur.by_day[0]) - 1; -- 2.30.2