Fix NBT parse crash when list has type TAG_End

This commit is contained in:
Justin Aquadro 2013-05-22 02:58:15 -04:00
parent 59ad0d3976
commit 60e7afa6cd

View file

@ -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));
}