1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

fix: nil pointer error

This commit is contained in:
akashi 2023-06-09 20:07:46 +08:00
parent 425f3e4d0c
commit 190c061e69

View File

@ -50,7 +50,7 @@ func (t *Transport) packBody(req *Request, w *binary.Writer) {
w.WriteUInt32(uint32(len(secSign) + 4)) w.WriteUInt32(uint32(len(secSign) + 4))
w.Write(secSign) w.Write(secSign)
} }
if wrapper.AllowSignSendMsg() && req.CommandName == "MessageSvc.PbSendMsg" { if wrapper.AllowSignSendMsg != nil && wrapper.AllowSignSendMsg() && req.CommandName == "MessageSvc.PbSendMsg" {
secSign := t.PackSecSign(req) secSign := t.PackSecSign(req)
w.WriteUInt32(uint32(len(secSign) + 4)) w.WriteUInt32(uint32(len(secSign) + 4))
w.Write(secSign) w.Write(secSign)