aboutsummaryrefslogtreecommitdiff
path: root/vcal.c
diff options
context:
space:
mode:
Diffstat (limited to 'vcal.c')
-rw-r--r--vcal.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/vcal.c b/vcal.c
index fa0649e6..0e4061c3 100644
--- a/vcal.c
+++ b/vcal.c
@@ -57,14 +57,16 @@ int DEEP_COPY(vcomponent)(vcomponent* a, vcomponent* b) {
return -1;
}
-content_line::content_line (strbuf* key, strbuf* val) {
+content_line::content_line (std::string* key, std::string* val) {
this->key = key;
this->push_value(val);
}
-void vcomponent:: push_kv (strbuf* key, strbuf* val) {
+void vcomponent:: push_kv (std::string* key, std::string* val) {
auto cl = new content_line (key, val);
- this->clines.push(key->mem, cl);
+ char * mem = (char*) malloc(key->length());
+ memcpy (mem, key->c_str(), key->length() + 1);
+ this->clines.push(mem, cl);
}
#if 0