mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-25 07:33:11 +00:00
Fixed bug in serialization of IPv6 addresses.
Change-Id: Ib63540123803317ec25f7cbf580c5159e4100222
This commit is contained in:
parent
f4c0018d7a
commit
4507083148
@ -208,6 +208,7 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
buf[i++] = xchar(((current_block_value & 0xf000) >> 12));
|
buf[i++] = xchar(((current_block_value & 0xf000) >> 12));
|
||||||
|
zero_flag = 0;
|
||||||
if (i >= buflen) return NULL;
|
if (i >= buflen) return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,6 +217,7 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
buf[i++] = xchar(((current_block_value & 0xf00) >> 8));
|
buf[i++] = xchar(((current_block_value & 0xf00) >> 8));
|
||||||
|
zero_flag = 0;
|
||||||
if (i >= buflen) return NULL;
|
if (i >= buflen) return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,6 +226,7 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
buf[i++] = xchar(((current_block_value & 0xf0) >> 4));
|
buf[i++] = xchar(((current_block_value & 0xf0) >> 4));
|
||||||
|
zero_flag = 0;
|
||||||
if (i >= buflen) return NULL;
|
if (i >= buflen) return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user