1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

int to int32

This commit is contained in:
Darien Raymond 2018-03-13 03:39:36 +01:00
parent 1cbfeea0cd
commit 5a227ec356
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -63,7 +63,7 @@ func (r *PacketReader) ReadMultiBuffer() (buf.MultiBuffer, error) {
// StreamReader reads Mux frame as a stream.
type StreamReader struct {
reader *buf.BufferedReader
leftOver int
leftOver int32
}
// NewStreamReader creates a new StreamReader.
@ -86,10 +86,10 @@ func (r *StreamReader) ReadMultiBuffer() (buf.MultiBuffer, error) {
if err != nil {
return nil, err
}
r.leftOver = int(size)
r.leftOver = int32(size)
}
mb, err := r.reader.ReadAtMost(r.leftOver)
r.leftOver -= mb.Len()
mb, err := r.reader.ReadAtMost(int(r.leftOver))
r.leftOver -= int32(mb.Len())
return mb, err
}