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