diff options
author | rockcavera <rockcavera@gmail.com> | 2020-10-25 04:29:57 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-25 08:29:57 +0100 |
commit | 7252a50fefb844d97ad4630c1db00063380ff3c4 (patch) | |
tree | 4cf75ef75761870d26300dbe43f524d948ce3387 /lib/pure | |
parent | 64eb62889a3c95986074b3e0d5656d7ad42ab826 (diff) | |
download | Nim-7252a50fefb844d97ad4630c1db00063380ff3c4.tar.gz |
fix #15698 (#15699)
* fix in the net.`$` to print zeros that are not in the compressed group * Update lib/pure/net.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> * Update net.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/net.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/net.nim b/lib/pure/net.nim index 3ef41aa3c..cd509463a 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, |