Skip to content

Commit

Permalink
Fixed empty SNBT lists in the cython version
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlegiantJGC committed Dec 10, 2019
1 parent 4141b2f commit 09efc60
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion amulet_nbt/amulet_cy_nbt.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,10 @@ cdef tuple _parse_snbt_recursive(str snbt, int index=0):
array.append(nested_data)
index = _strip_comma(snbt, index, ']')

data = TAG_List(array, first_data_type().tag_id)
if first_data_type is None:
data = TAG_List()
else:
data = TAG_List(array, first_data_type().tag_id)

# skip the ]
index += 1
Expand Down

0 comments on commit 09efc60

Please sign in to comment.