summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2014-07-28 12:39:06 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2014-07-28 12:43:00 +0200
commit6aa21da8c6512110c4ecdcd7e73ed37262ca6cf9 (patch)
treebd96a55987abce7c835ef69ab892181d890d68f8
parent6ca2535f5e35147b469fb4a9bde9148eed4aa01e (diff)
downloadcalcurse-6aa21da8c6512110c4ecdcd7e73ed37262ca6cf9.tar.gz
calcurse-6aa21da8c6512110c4ecdcd7e73ed37262ca6cf9.zip
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>
-rw-r--r--src/ical.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ical.c b/src/ical.c
index dda642a..38e1b33 100644
--- a/src/ical.c
+++ b/src/ical.c
@@ -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) {