Fixed bug in serialization of IPv6 addresses.

Change-Id: Ib63540123803317ec25f7cbf580c5159e4100222
This commit is contained in:
Ivan Delamer 2011-08-04 14:18:33 -06:00
parent f4c0018d7a
commit 4507083148

View File

@ -208,6 +208,7 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen)
}
else {
buf[i++] = xchar(((current_block_value & 0xf000) >> 12));
zero_flag = 0;
if (i >= buflen) return NULL;
}
@ -216,6 +217,7 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen)
}
else {
buf[i++] = xchar(((current_block_value & 0xf00) >> 8));
zero_flag = 0;
if (i >= buflen) return NULL;
}
@ -224,6 +226,7 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen)
}
else {
buf[i++] = xchar(((current_block_value & 0xf0) >> 4));
zero_flag = 0;
if (i >= buflen) return NULL;
}