aboutsummaryrefslogtreecommitdiff
path: root/vcal.c
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-23 21:19:32 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-23 21:19:32 +0100
commit097442ed9e3340344d7fbc021baaf0b11e7ea4fb (patch)
treee86018252bff6a8a9ac5ae2942845ccbb6ba02db /vcal.c
parentVill inte. (diff)
downloadcalp-c++2.tar.gz
calp-c++2.tar.xz
Everything broken, again.c++2
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