diff --git a/client/decoders.go b/client/decoders.go index 7899622b..b949fceb 100644 --- a/client/decoders.go +++ b/client/decoders.go @@ -253,7 +253,7 @@ func decodeTransEmpResponse(c *QQClient, pkt *network.Packet) (any, error) { } sig := body.ReadBytesShort() body.ReadUInt16() - m, err := tlv.NewDecoder(2, 2).DecodeRecordMap(reader.ReadAvailable()) + m, err := tlv.NewDecoder(2, 2).DecodeRecordMap(body.ReadAvailable()) if err != nil { return nil, err } diff --git a/client/internal/network/transport.go b/client/internal/network/transport.go index 3590d294..caa5bbed 100644 --- a/client/internal/network/transport.go +++ b/client/internal/network/transport.go @@ -21,8 +21,8 @@ func (t *Transport) packBody(req *Request, w *binary.Writer) { pos := w.FillUInt32() if req.Type == RequestTypeLogin { w.WriteUInt32(uint32(req.SequenceID)) - w.WriteUInt32((*t.Version).AppId) - w.WriteUInt32((*t.Version).SubAppId) + w.WriteUInt32(t.Version.AppId) + w.WriteUInt32(t.Version.SubAppId) w.Write([]byte{0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00}) tgt := t.Sig.TGT if len(tgt) == 0 || len(tgt) == 4 {