From 5a5a6fa893e31efc89c8ce39a90712415911be9e Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 7 Nov 2024 19:36:56 +0000 Subject: [PATCH] fix pointer --- packet.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packet.go b/packet.go index f9b3356..66f4a1c 100644 --- a/packet.go +++ b/packet.go @@ -22,7 +22,7 @@ type packet struct { bpsIndex int channel int framecounter []byte - hbuf bytes.Buffer + hbuf *bytes.Buffer } // newPacket returns a packet struct with default values, framecounter at 0. @@ -35,7 +35,7 @@ func newPacket(streamname string) packet { bpsIndex: 0, channel: 0, framecounter: make([]byte, 4), - hbuf: *bytes.NewBuffer(make([]byte, headerSz)), + hbuf: bytes.NewBuffer(make([]byte, headerSz)), } }