ical.c: Parse multiple exception rules properly

There can be multiple EXDATE lines per event. Parse them correctly
instead of making the last line overwrite the previous ones.

Reported-by: Håkan Jerning <jerning@home.se>
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2014-07-28 12:39:06 +02:00
parent 6ca2535f5e
commit 6aa21da8c6

View File

@ -780,7 +780,6 @@ ical_read_exdate(llist_t * exc, FILE * log, char *exstr,
char *p, *q;
long date;
LLIST_INIT(exc);
if ((p = strchr(exstr, ':')) != NULL) {
p++;
while ((q = strchr(p, ',')) != NULL) {
@ -882,6 +881,7 @@ ical_read_event(FILE * fdi, FILE * log, unsigned *noevents,
vevent_type = UNDEFINED;
memset(&vevent, 0, sizeof vevent);
LLIST_INIT(&vevent.exc);
skip_alarm = 0;
while (ical_readline(fdi, buf, lstore, lineno)) {
if (skip_alarm) {