bytes to number methods

This commit is contained in:
v2ray committed 2016-01-24 22:28:44 +01:00
1 parent 96f582da98
commit 2b1441b030
4 files changed
+20 -13

No files matched your search

+1 -1
View File
@@ -78,7 +78,7 @@ func (this *SwitchAccount) Unmarshal(data []byte) error {
if len(data) < alterIdStart+2 {
return transport.CorruptedPacket
}
this.AlterIds = serial.ParseUint16(data[alterIdStart : alterIdStart+2])
this.AlterIds = serial.BytesLiteral(data[alterIdStart : alterIdStart+2]).Uint16()
levelStart := alterIdStart + 2
if len(data) < levelStart+1 {
return transport.CorruptedPacket