diff options
Diffstat (limited to 'src/tag.c')
-rw-r--r-- | src/tag.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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); |