1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08: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
commit dab2c35f17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)