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:
parent
6ca2535f5e
commit
6aa21da8c6
@ -780,7 +780,6 @@ ical_read_exdate(llist_t * exc, FILE * log, char *exstr,
|
|||||||
char *p, *q;
|
char *p, *q;
|
||||||
long date;
|
long date;
|
||||||
|
|
||||||
LLIST_INIT(exc);
|
|
||||||
if ((p = strchr(exstr, ':')) != NULL) {
|
if ((p = strchr(exstr, ':')) != NULL) {
|
||||||
p++;
|
p++;
|
||||||
while ((q = strchr(p, ',')) != NULL) {
|
while ((q = strchr(p, ',')) != NULL) {
|
||||||
@ -882,6 +881,7 @@ ical_read_event(FILE * fdi, FILE * log, unsigned *noevents,
|
|||||||
|
|
||||||
vevent_type = UNDEFINED;
|
vevent_type = UNDEFINED;
|
||||||
memset(&vevent, 0, sizeof vevent);
|
memset(&vevent, 0, sizeof vevent);
|
||||||
|
LLIST_INIT(&vevent.exc);
|
||||||
skip_alarm = 0;
|
skip_alarm = 0;
|
||||||
while (ical_readline(fdi, buf, lstore, lineno)) {
|
while (ical_readline(fdi, buf, lstore, lineno)) {
|
||||||
if (skip_alarm) {
|
if (skip_alarm) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user