cosmetic
This commit is contained in:
parent
10f9ca135a
commit
974f324aec
|
@ -118,7 +118,7 @@ proc tcpChecksum(buffer: string): uint16 =
|
|||
checksum = checksum + ntohs(tcp[])
|
||||
tcp = cast[ptr uint16](cast[ByteAddress](tcp) + sizeof(uint16))
|
||||
tcpLen = tcpLen - sizeof(uint16).uint16
|
||||
# Add leftover single byte
|
||||
# Add leftover byte
|
||||
if tcpLen != 0:
|
||||
checksum = checksum + cast[ptr uint8](tcp)[]
|
||||
# Fold 16-bit segments of the 32-bit checksum and add carry bit. Result is the
|
||||
|
|
Loading…
Reference in New Issue