NBT
NBT copied to clipboard
Prevent null keys and values and EndTag values in CompoundTag and ListTag
Title says it all :)
NBT doesn't have a concept of null
, and CompoundTag
is clearly not designed for null
keys or values.
In the interest of failing fast it'd be good to reject any rogue null
's upfront.
Edit: I also added a check to prevent EndTag
values in CompoundTag
. ListTag
's updateType
already took care of this.
Since this PR also addresses the array tags:
ListTag
should have a check in the ListTag(List<Tag>, byte)
constructor, because its underlying value should not be null
.
Good catch, I've added some checks in ListTag
:)
Whoops, github does not like renaming branches...