mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-24 15:14:06 +00:00
Fixed void ptr address increment bug reported by Bertrik Sikken.
This commit is contained in:
parent
e1b215aa73
commit
33fbb06604
@ -72,7 +72,7 @@ lwip_standard_chksum(void *dataptr, int len)
|
|||||||
* ARCHITECTURES WHICH DO NOT ALLOW UNALIGNED 16-BIT ACCESSES */
|
* ARCHITECTURES WHICH DO NOT ALLOW UNALIGNED 16-BIT ACCESSES */
|
||||||
#if MEM_ALIGNMENT >= 2
|
#if MEM_ALIGNMENT >= 2
|
||||||
acc += htons( ((u16_t)(((u8_t *)dataptr)[0])<<8) | ((u8_t *)dataptr)[1] );
|
acc += htons( ((u16_t)(((u8_t *)dataptr)[0])<<8) | ((u8_t *)dataptr)[1] );
|
||||||
dataptr += 2;
|
(void *)((u16_t *)dataptr + 1);
|
||||||
#else
|
#else
|
||||||
acc += *(u16_t *)dataptr;
|
acc += *(u16_t *)dataptr;
|
||||||
dataptr = (void *)((u16_t *)dataptr + 1);
|
dataptr = (void *)((u16_t *)dataptr + 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user