From bf1ee762e0f289eb907f2c2aed31e02d682c0061 Mon Sep 17 00:00:00 2001 From: MCausc78 Date: Wed, 6 Sep 2023 02:28:27 +0300 Subject: [PATCH] fix --- gorcon.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gorcon.go b/gorcon.go index 90764e5..6161cc1 100644 --- a/gorcon.go +++ b/gorcon.go @@ -47,7 +47,7 @@ func NewRCONClient(host string, port uint16) *RCONClient { func (client *RCONClient) SendPacket(packet Packet) error { payload := []byte(packet.Data) payloadLength := len(payload) - data := make([]byte, 14+payloadLength) + data := make([]byte, 15+payloadLength) MCEndian.PutUint32(data, uint32(10+payloadLength)) MCEndian.PutUint32(data[4:], uint32(packet.RequestID)) MCEndian.PutUint32(data[8:], uint32(packet.Type))