1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-07-09 07:28:33 +00:00

Merge pull request #337 from 6DDUU6/master

fix: nil pointer error
This commit is contained in:
Mrs4s
2023-06-10 16:27:41 +08:00
committed by GitHub

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)