Merge branch 'main' of github.com:lohhiiccc/icmp
This commit is contained in:
commit
f85b342f8c
1 changed files with 1 additions and 2 deletions
|
|
@ -42,8 +42,7 @@ sum_words(const uint8_t *data, size_t len)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle odd byte if present */
|
/* Handle odd byte if present */
|
||||||
if (len & 1)
|
sum += ((uint32_t)(*ptr << 8)) & (uint32_t)(-(len & 1));
|
||||||
sum += (uint32_t)(*ptr << 8);
|
|
||||||
|
|
||||||
return sum;
|
return sum;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue