mirror of https://github.com/v2ray/v2ray-core
use WriteByte instead of copy
parent
844f6937a4
commit
e392f8ed3d
|
@ -17,7 +17,7 @@ func readOne(r io.Reader) (*Buffer, error) {
|
||||||
|
|
||||||
b := New()
|
b := New()
|
||||||
if nBytes > 0 {
|
if nBytes > 0 {
|
||||||
copy(b.Extend(int32(nBytes)), firstByte[:])
|
common.Must(b.WriteByte(firstByte[0]))
|
||||||
}
|
}
|
||||||
for i := 0; i < 64; i++ {
|
for i := 0; i < 64; i++ {
|
||||||
_, err := b.ReadFrom(r)
|
_, err := b.ReadFrom(r)
|
||||||
|
|
Loading…
Reference in New Issue