Skip to content

Commit 0676221

Browse files
committed
fix: avoid bitshifting uint8
1 parent 06b4c16 commit 0676221

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Coder Desktop/VPNLib/Receiver.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,5 @@ func deserializeLen(_ data: Data) throws -> UInt32 {
9090
if data.count != 4 {
9191
throw ReceiveError.invalidLength
9292
}
93-
return UInt32(data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3])
93+
return UInt32(data[0]) << 24 | UInt32(data[1]) << 16 | UInt32(data[2]) << 8 | UInt32(data[3])
9494
}

0 commit comments

Comments
 (0)