From e5c95f1501a7800eed9ac1f113058715671b7221 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 7 Feb 2017 10:39:54 +0100 Subject: [PATCH] avoid division by zero when no calendar is configured --- src/kernel/xmlreader.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/kernel/xmlreader.c b/src/kernel/xmlreader.c index 6491daf20..d89259317 100644 --- a/src/kernel/xmlreader.c +++ b/src/kernel/xmlreader.c @@ -361,7 +361,6 @@ static int parse_calendar(xmlDocPtr doc) xpathCalendars = xmlXPathEvalExpression(BAD_CAST "/eressea/calendar", xpath); nsetCalendars = xpathCalendars->nodesetval; - months_per_year = 0; if (nsetCalendars != NULL && nsetCalendars->nodeNr != 0) { int c; for (c = 0; c != nsetCalendars->nodeNr; ++c) {