MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / decodeListArray

Method decodeListArray

protocol/nbt/qnbt/list.go:52–72  ·  view source on GitHub ↗
(a *array_t)

Source from the content-addressed store, hash-verified

50}
51
52func (d *Decoder) decodeListArray(a *array_t) error {
53 tag, err := d.readByte2()
54 if err != nil {
55 return err
56 }
57
58 l, err := d.readInt()
59 if err != nil {
60 return err
61 }
62
63 if tag == end_t {
64 return nil
65 }
66
67 if uintptr(l) < a.len {
68 return fmt.Errorf("array too small")
69 }
70
71 return d.readListArray(tag, l, a)
72}
73
74func (d *Decoder) readListArray(tag byte, l int32, a *array_t) error {
75 kind := kindOf(a.elem)

Callers 2

decodeStructCompoundMethod · 0.95
readListArrayMethod · 0.95

Calls 3

readByte2Method · 0.95
readIntMethod · 0.95
readListArrayMethod · 0.95

Tested by

no test coverage detected