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

fix nil in multi reader

This commit is contained in:
wdvxdr 2022-03-28 13:35:58 +08:00
parent 33590e4b32
commit 4f05838b6c
No known key found for this signature in database
GPG Key ID: 703F8C071DE7A1B6
2 changed files with 2 additions and 2 deletions

View File

@ -156,7 +156,7 @@ func (c *QQClient) UploadShortVideo(target message.Source, video, thumb io.ReadS
cmd = 89
}
ext, _ := proto.Marshal(c.buildPttShortVideoProto(target, videoSum, thumbSum, videoLen, thumbLen).PttShortVideoUploadReq)
combined := utils.MultiReadSeeker(thumb, video)
combined := io.MultiReader(thumb, video)
input := highway.Transaction{
CommandID: cmd,
Body: combined,

View File

@ -23,7 +23,7 @@ func (r *multiReadSeeker) Read(p []byte) (int, error) {
readers := make([]io.Reader, len(r.readers))
for i := range r.readers {
_, _ = r.readers[i].Seek(0, io.SeekStart)
readers = append(readers, r.readers[i])
readers[i] = r.readers[i]
}
r.multiReader = io.MultiReader(readers...)
}