diff options
Diffstat (limited to 'libical/src/libicalvcal/vcc.y')
-rw-r--r-- | libical/src/libicalvcal/vcc.y | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/libical/src/libicalvcal/vcc.y b/libical/src/libicalvcal/vcc.y index 70feefab57..4397198b1b 100644 --- a/libical/src/libicalvcal/vcc.y +++ b/libical/src/libicalvcal/vcc.y @@ -414,9 +414,31 @@ static void enterValues(const char *value) } else { if (value) { - setVObjectUStringZValue_(curProp,fakeUnicode(value,0)); + char *p1, *p2; + wchar_t *p3; + int i; + + /* If the property already has a string value, we append this one, + using ';' to separate the values. */ + if (vObjectUStringZValue(curProp)) { + p1 = fakeCString(vObjectUStringZValue(curProp)); + p2 = malloc((strlen(p1)+strlen(value)+1)); + strcpy(p2, p1); + deleteStr(p1); + + i = strlen(p2); + p2[i] = ';'; + p2[i+1] = '\0'; + p2 = strcat(p2, value); + p3 = (wchar_t *) vObjectUStringZValue(curProp); + free(p3); + setVObjectUStringZValue_(curProp,fakeUnicode(p2,0)); + deleteStr(p2); + } else { + setVObjectUStringZValue_(curProp,fakeUnicode(value,0)); } } + } deleteStr(value); } |