summaryrefslogtreecommitdiff
path: root/src/tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tag.c b/src/tag.c
index 25d9d32..d704b13 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -1,4 +1,5 @@
#include "tag.h"
+#include "map.h"
#include "nbt/nbt.h"
#include "json/json.h"
@@ -28,9 +29,7 @@ void tag_free(tag_t *tag) {
free(tag->data.list.tags);
break;
case TAG_COMPOUND:
- for (int32_t i = 0; i < tag->data.compound.size; i++)
- tag_free(&tag->data.compound.tags[i]);
- free(tag->data.compound.tags);
+ map_free(&tag->data.compound);
break;
case TAG_INT_ARRAY:
free(tag->data.i_arr.data);