From 9ff97780866a2164fa0cfdc432fe7f65acb45e29 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Tue, 6 Feb 2001 19:36:59 +0000 Subject: Added a missing #include here. 2001-02-06 Christopher James Lahey * src/libical/icallangbind.c: Added a missing #include here. * src/libical/icalrecur.c (icalrecur_add_bydayrules): Copy the passed in const vals since we change it. svn path=/trunk/; revision=8019 --- libical/ChangeLog | 7 +++++++ libical/src/libical/icallangbind.c | 1 + libical/src/libical/icalrecur.c | 9 +++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) (limited to 'libical') diff --git a/libical/ChangeLog b/libical/ChangeLog index 1e95366cc4..1f7ac5735e 100644 --- a/libical/ChangeLog +++ b/libical/ChangeLog @@ -1,3 +1,10 @@ +2001-02-06 Christopher James Lahey + + * src/libical/icallangbind.c: Added a missing #include here. + + * src/libical/icalrecur.c (icalrecur_add_bydayrules): Copy the + passed in const vals since we change it. + 2001-02-05 JP Rosevear * src/libical/icallangbind.c (icallangbind_get_property): Use the diff --git a/libical/src/libical/icallangbind.c b/libical/src/libical/icallangbind.c index 56376bf5a2..d52f491b93 100644 --- a/libical/src/libical/icallangbind.c +++ b/libical/src/libical/icallangbind.c @@ -19,6 +19,7 @@ ======================================================================*/ #include "ical.h" +#include diff --git a/libical/src/libical/icalrecur.c b/libical/src/libical/icalrecur.c index db3f7aefff..d5c73e80dd 100644 --- a/libical/src/libical/icalrecur.c +++ b/libical/src/libical/icalrecur.c @@ -277,9 +277,12 @@ void icalrecur_add_bydayrules(struct icalrecur_parser *parser, const char* vals) icalrecurrencetype_weekday wd; short *array = parser->rt.by_day; char* end; + char* vals_copy; - end = (char*)vals+strlen(vals); - n = vals; + vals_copy = strdup(vals); + + end = (char*)vals_copy+strlen(vals_copy); + n = vals_copy; while(n != 0){ @@ -323,6 +326,8 @@ void icalrecur_add_bydayrules(struct icalrecur_parser *parser, const char* vals) } + free(vals_copy); + } -- cgit v1.2.3