From b8e2b66a353b73b19aa8d3bf66f4acca02f5ffc7 Mon Sep 17 00:00:00 2001 From: Tnze Date: Mon, 3 Jun 2019 13:23:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A9ByteArray=E7=9A=84Encode=E4=B8=8D?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- net/packet/types.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/packet/types.go b/net/packet/types.go index 3dcdeed..86edbbb 100644 --- a/net/packet/types.go +++ b/net/packet/types.go @@ -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