1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-04-18 03:29:12 -04:00

fix compile warning

This commit is contained in:
Darien Raymond
2016-12-12 21:58:13 +01:00
parent 582438ce5e
commit 42417cab17
2 changed files with 5 additions and 4 deletions

View File

@@ -19,8 +19,8 @@ func (v *SRTP) Size() int {
func (v *SRTP) Write(b []byte) (int, error) {
v.number++
b = serial.Uint16ToBytes(v.number, b[:0])
b = serial.Uint16ToBytes(v.number, b)
serial.Uint16ToBytes(v.number, b[:0])
serial.Uint16ToBytes(v.number, b[:2])
return 4, nil
}

View File

@@ -19,8 +19,9 @@ func (v *UTP) Size() int {
}
func (v *UTP) Write(b []byte) (int, error) {
b = serial.Uint16ToBytes(v.connectionId, b[:0])
b = append(b, v.header, v.extension)
serial.Uint16ToBytes(v.connectionId, b[:0])
b[2] = v.header
b[3] = v.extension
return 4, nil
}