aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tag.c b/src/tag.c
index 1dffeef41..d76ba5d95 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -313,9 +313,11 @@ struct tag *tag_dup(const struct tag *tag)
ret = tag_new();
ret->time = tag->time;
+ ret->numOfItems = tag->numOfItems;
+ ret->items = xmalloc(ret->numOfItems * sizeof(ret->items[0]));
for (i = 0; i < tag->numOfItems; i++) {
- tag_add_item(ret, tag->items[i]->type, tag->items[i]->value);
+ ret->items[i] = tag_pool_dup_item(tag->items[i]);
}
return ret;