mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-05-10 06:29:08 -04:00
use WriteByte instead of copy
This commit is contained in:
@@ -17,7 +17,7 @@ func readOne(r io.Reader) (*Buffer, error) {
|
||||
|
||||
b := New()
|
||||
if nBytes > 0 {
|
||||
copy(b.Extend(int32(nBytes)), firstByte[:])
|
||||
common.Must(b.WriteByte(firstByte[0]))
|
||||
}
|
||||
for i := 0; i < 64; i++ {
|
||||
_, err := b.ReadFrom(r)
|
||||
|
||||
Reference in New Issue
Block a user