diff --git a/sys/checksum/fletcher32.c b/sys/checksum/fletcher32.c index 1bfb815cf3a6cb89e7403de6e33f4bd087682c4f..5bbd306f3d74e5e512121502df8e3d2bd4551070 100644 --- a/sys/checksum/fletcher32.c +++ b/sys/checksum/fletcher32.c @@ -18,6 +18,7 @@ * @} */ +#include "unaligned.h" #include "checksum/fletcher32.h" uint32_t fletcher32(const uint16_t *data, size_t words) @@ -28,7 +29,7 @@ uint32_t fletcher32(const uint16_t *data, size_t words) unsigned tlen = words > 359 ? 359 : words; words -= tlen; do { - sum2 += sum1 += *data++; + sum2 += sum1 += unaligned_get_u16(data++); } while (--tlen); sum1 = (sum1 & 0xffff) + (sum1 >> 16); sum2 = (sum2 & 0xffff) + (sum2 >> 16);