diff --git a/lib/pure/net.nim b/lib/pure/net.nim index 3ef41aa3c4..cd509463a2 100644 --- a/lib/pure/net.nim +++ b/lib/pure/net.nim @@ -1827,6 +1827,10 @@ proc `$`*(address: IpAddress): string = result.add(chr(uint16(ord('a'))+val-0xA)) afterLeadingZeros = true mask = mask shr 4 + + if not afterLeadingZeros: + result.add '0' + printedLastGroup = true proc dial*(address: string, port: Port,