让ByteArray的Encode不使用指针
This commit is contained in:
@ -359,8 +359,8 @@ func (n NBT) Decode(r DecodeReader) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Encode a ByteArray
|
// Encode a ByteArray
|
||||||
func (b *ByteArray) Encode() []byte {
|
func (b ByteArray) Encode() []byte {
|
||||||
return append(VarInt(len(*b)).Encode(), *b...)
|
return append(VarInt(len(b)).Encode(), b...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decode a ByteArray
|
// Decode a ByteArray
|
||||||
|
Reference in New Issue
Block a user