forked from mirrors/NBTExplorer
Fix NBT parse crash when list has type TAG_End
This commit is contained in:
parent
59ad0d3976
commit
60e7afa6cd
1 changed files with 3 additions and 0 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue