Fixed void ptr address increment bug reported by Bertrik Sikken.

This commit is contained in:
christiaans 2005-11-25 12:23:03 +00:00
parent e1b215aa73
commit 33fbb06604

View File

@ -72,7 +72,7 @@ lwip_standard_chksum(void *dataptr, int len)
* ARCHITECTURES WHICH DO NOT ALLOW UNALIGNED 16-BIT ACCESSES */
#if MEM_ALIGNMENT >= 2
acc += htons( ((u16_t)(((u8_t *)dataptr)[0])<<8) | ((u8_t *)dataptr)[1] );
dataptr += 2;
(void *)((u16_t *)dataptr + 1);
#else
acc += *(u16_t *)dataptr;
dataptr = (void *)((u16_t *)dataptr + 1);