mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-12 12:45:35 +00:00
ipv6_addr: Render last zero in ip6addr_ntoa_r if not in first empty block
This commit is contained in:
parent
bd177ff38f
commit
ebd103775d
@ -207,7 +207,7 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen)
|
||||
|
||||
/* Check for empty block. */
|
||||
if (current_block_value == 0) {
|
||||
if (current_block_index == 7) {
|
||||
if (current_block_index == 7 && empty_block_flag == 1) {
|
||||
/* special case, we must render a ':' for the last block. */
|
||||
buf[i++] = ':';
|
||||
if (i >= buflen) {
|
||||
|
Loading…
Reference in New Issue
Block a user