summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix von Leitner <felix-libowfat@fefe.de>2017-08-07 19:24:19 +0000
committerFelix von Leitner <felix-libowfat@fefe.de>2017-08-07 19:24:19 +0000
commit8dc2bb262b853726866ba571da41d2dd34e4cc10 (patch)
treeb35d9d9576586a023114fe43a2263fc02637c37d
parent5a711cb7eea79d0aeacd324199207d4d446a38f7 (diff)
downloadlibowfat-8dc2bb262b853726866ba571da41d2dd34e4cc10.tar.gz
libowfat-8dc2bb262b853726866ba571da41d2dd34e4cc10.zip
no :: at the end if it's only :0
-rw-r--r--socket/fmt_ip6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/socket/fmt_ip6.c b/socket/fmt_ip6.c
index a23104e..de919cc 100644
--- a/socket/fmt_ip6.c
+++ b/socket/fmt_ip6.c
@@ -11,7 +11,7 @@ size_t fmt_ip6(char *s,const char ip[16])
for (k=0; k<16; k+=2) {
if (ip[k]==0 && ip[k+1]==0) {
if (!compr) {
- if (k==14 || (ip[k+2]==0 && ip[k+3]==0)) {
+ if (k<=14 && ip[k+2]==0 && ip[k+3]==0) {
compr=1;
pos1=k;
}