summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libical/icalparser.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libical/icalparser.c b/src/libical/icalparser.c
index 43ea9035..8eb0f4e7 100644
--- a/src/libical/icalparser.c
+++ b/src/libical/icalparser.c
@@ -1093,6 +1093,18 @@ icalcomponent* icalparser_add_line(icalparser* parser,
*/
switch (prop_kind) {
case ICAL_X_PROPERTY:
+ /* Apple's geofence property uses a comma to separate latitude and longitude.
+ libical will normally try to split this into two separate values,
+ but in this case we need to treat it as a single value.
+ */
+ if (strncmp(icalproperty_get_x_name(prop), "X-APPLE-STRUCTURED-LOCATION", 27) == 0) {
+ str = icalparser_get_value(end, &end, value_kind);
+ } else {
+ str = parser_get_next_value(end,&end, value_kind);
+ }
+
+ strstriplt (str);
+ break;
case ICAL_CATEGORIES_PROPERTY:
case ICAL_RESOURCES_PROPERTY:
/* Referring to RFC 2445, section 4.8.5.3 and section 4.8.5.1: