ICAL: fix calculation of the icaltime pointer in our buffer.
authorWilfried Goesgens <dothebart@citadel.org>
Sat, 27 Oct 2012 18:34:59 +0000 (20:34 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sat, 27 Oct 2012 18:34:59 +0000 (20:34 +0200)
webcit/ical_subst.c

index e48b2f9902b0c9aa5a55d7435f1ab0b21fe2e136..43a10f2eb503cbbb336425ec0d7b0de1b43fc7f5 100644 (file)
@@ -167,7 +167,7 @@ int cond_ICalHaveTimeItem(StrBuf *Target, WCTemplputParams *TP)
 
                DynamicTP = (WCTemplputParams*) malloc(sizeof(WCTemplputParams) + 
                                                       sizeof(struct icaltimetype));
-               t = (struct icaltimetype *) ((char*)DynamicTP) + sizeof(WCTemplputParams);
+               t = (struct icaltimetype *) &DynamicTP[1];
                memset(&tt, 0, sizeof(struct icaltimetype));
                switch (Kind)
                {