1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 11:07:40 +08:00

fix: temporary fix qidian protocol panic

This commit is contained in:
Mrs4s 2022-05-10 18:20:23 +08:00
parent 27c591e3cb
commit 4164d656d8
No known key found for this signature in database
GPG Key ID: 3186E98FA19CE3A7

View File

@ -143,6 +143,9 @@ func (c *QQClient) bigDataRequest(subCmd uint32, req proto.Message) ([]byte, err
} }
defer func() { _ = rsp.Body.Close() }() defer func() { _ = rsp.Body.Close() }()
rspBody, _ := io.ReadAll(rsp.Body) rspBody, _ := io.ReadAll(rsp.Body)
if len(rspBody) == 0 {
return nil, errors.Wrap(err, "request error")
}
r := binary.NewReader(rspBody) r := binary.NewReader(rspBody)
r.ReadByte() r.ReadByte()
l1 := int(r.ReadInt32()) l1 := int(r.ReadInt32())