Commit 1b0bcb34 authored by Jonathan Beck's avatar Jonathan Beck

Fix copy_node to also copy key nodes.

parent 07c1d3c9
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment