diff --git a/SubstrateCS/Source/Nbt/NbtTree.cs b/SubstrateCS/Source/Nbt/NbtTree.cs index b1b95c1..081fbc0 100644 --- a/SubstrateCS/Source/Nbt/NbtTree.cs +++ b/SubstrateCS/Source/Nbt/NbtTree.cs @@ -302,6 +302,9 @@ namespace Substrate.Nbt throw new NBTException(NBTException.MSG_READ_NEG); } + if (val.ValueType == TagType.TAG_END) + return val; + for (int i = 0; i < length; i++) { val.Add(ReadValue(val.ValueType)); }