diff options
Diffstat (limited to '')
-rw-r--r-- | src/nbt/print.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nbt/print.c b/src/nbt/print.c index 4eac31f..3f687dc 100644 --- a/src/nbt/print.c +++ b/src/nbt/print.c @@ -64,9 +64,11 @@ static bool nbt_print_list(const tagdata_t *data, const stream_t *stream) { } static bool nbt_print_compound(const tagdata_t *data, const stream_t *stream) { - for (int32_t i = 0; i < data->compound.size; i++) - if (nbt_print(&data->compound.tags[i], stream) == false) + for (uint32_t i = 0; i < data->compound.capacity; i++) { + if (data->compound.entries[i].name == NULL) continue; + if (nbt_print(&data->compound.entries[i], stream) == false) return false; + } if (stream_write_i8(stream, TAG_END) == false) return false; return true; |