The code is five characters shorter now ;-)
FossilOrigin-Name: 550abd15fe7e0383ab036ccd32598a32c03a0ca227cb7196b432e1cce3b5030a
This commit is contained in:
parent
468d2f05a9
commit
57028f414b
@ -33,7 +33,7 @@ uint16_t lw_checksum(uint8_t * d, int len)
|
||||
len -= 2;
|
||||
}
|
||||
|
||||
if (len == 1)
|
||||
if (len)
|
||||
sum += (*(uint8_t *) w) << 8;
|
||||
|
||||
sum = (sum >> 16) + (sum & 0xffff);
|
||||
|
Loading…
Reference in New Issue
Block a user