Workaround for an odd type inference problem associated with the IAR compiler. Patch by Vilhelm Jutvik.

This commit is contained in:
Niclas Finne 2012-09-12 14:46:19 +02:00
parent ee7af77ca9
commit 8053e2c353

View file

@ -508,7 +508,7 @@ remove_ext_hdr(void)
if(uip_ext_len > 0) {
PRINTF("Cutting ext-header before processing (extlen: %d, uiplen: %d)\n",
uip_ext_len, uip_len);
if(uip_len - UIP_IPH_LEN - uip_ext_len < 0) {
if(uip_len < UIP_IPH_LEN + uip_ext_len) {
PRINTF("ERROR: uip_len too short compared to ext len\n");
uip_ext_len = 0;
uip_len = 0;