From 955e52dfa596f77dff380dc2c4c0668b00673619 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Mon, 23 Apr 2012 19:17:58 +0200 Subject: [PATCH] fix *::0 display bug --- README | 2 -- output.c | 2 +- 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/README b/README index 65a6680..b690db2 100644 --- a/README +++ b/README @@ -28,5 +28,3 @@ The program currently does not understand IPv4-mapped addresses in the form ::1.2.3.4 There are no unit tests yet (this should be doable with a simple script). - -"./ip6calc 2001:db8::" yields "2001:db8::0/64" instead of "2001:db8::/64" \ No newline at end of file diff --git a/output.c b/output.c index c97c245..8b26162 100644 --- a/output.c +++ b/output.c @@ -70,7 +70,7 @@ void printshort(ip6addr caddr) return; } /*find longest stretch of zeroes*/ - for(i=0;i<7;i++){ + for(i=0;i<8;i++){ if(caddr[i]){ /*check for maximum*/ if(zl>mzl){ -- 1.7.2.5