fix snbt decoding bug found in #121

This commit is contained in:
Tnze
2021-08-28 13:01:17 +08:00
parent 3b6f23f686
commit 57b0a6fdc6
3 changed files with 5 additions and 2 deletions

View File

@ -247,7 +247,7 @@ func writeListOrArray(e *Encoder, d *decodeState) (tagType byte, err error) {
}
break
}
if d.opcode != scanListValue { // TAG_List<TAG_String>
if d.opcode != scanListValue && d.opcode != scanEndValue { // TAG_List<TAG_String>
panic(phasePanicMsg)
}
var tagType byte