X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fnetwork%2Finet_ntop.c;h=4bfef2c557ab4478afeb5c22f5d548fd69e51d3c;hb=e2e9517607f67c1e23c059769b19bf4270d22123;hp=14f9f4c4018ed5dc0a3a4c9db1839c411135bfad;hpb=571744447c23f91feb6439948f3a619aca850dfb;p=musl diff --git a/src/network/inet_ntop.c b/src/network/inet_ntop.c index 14f9f4c4..4bfef2c5 100644 --- a/src/network/inet_ntop.c +++ b/src/network/inet_ntop.c @@ -36,7 +36,7 @@ const char *inet_ntop(int af, const void *restrict a0, char *restrict s, socklen j = strspn(buf+i, ":0"); if (j>max) best=i, max=j; } - if (max>2) { + if (max>3) { buf[best] = buf[best+1] = ':'; memmove(buf+best+2, buf+best+max, i-best-max+1); }