diff options
author | Jonathan Beck | 2009-07-18 12:10:07 +0200 |
---|---|---|
committer | Jonathan Beck | 2009-07-18 12:10:07 +0200 |
commit | 1b0bcb3434d25d425862a2e06d63277c0ad3a9f1 (patch) | |
tree | 8019546524bb2080cb9ee571638edfb0708fe4f3 /src | |
parent | 07c1d3c90512f5fa057e7eff7d307cffe6258111 (diff) | |
download | libplist-1b0bcb3434d25d425862a2e06d63277c0ad3a9f1.tar.gz libplist-1b0bcb3434d25d425862a2e06d63277c0ad3a9f1.tar.bz2 |
Fix copy_node to also copy key nodes.
Diffstat (limited to 'src')
-rw-r--r-- | src/plist.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plist.c b/src/plist.c index 143418d..4d98fd2 100644 --- a/src/plist.c +++ b/src/plist.c @@ -150,11 +150,12 @@ static void plist_copy_node(GNode * node, gpointer parent_node_ptr) memcpy(newdata, data, sizeof(struct plist_data_s)); plist_type node_type = plist_get_node_type(node); - if (node_type == PLIST_DATA || node_type == PLIST_STRING) { + if (node_type == PLIST_DATA || node_type == PLIST_STRING || node_type == PLIST_KEY) { switch (node_type) { case PLIST_DATA: newdata->buff = (uint8_t *) malloc(data->length); memcpy(newdata->buff, data->buff, data->length); + case PLIST_KEY: case PLIST_STRING: newdata->strval = strdup((char *) data->strval); default: |