From 8d3d9ce5cc8a7e82482c25c7acc7737410d76f3b Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Thu, 26 Jan 2017 23:50:19 +0100 Subject: [PATCH] repr.nim: minor improvement when outputting addresses of cstrings --- lib/system/repr.nim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/system/repr.nim b/lib/system/repr.nim index db7fdcbcaf..04dbe1142d 100644 --- a/lib/system/repr.nim +++ b/lib/system/repr.nim @@ -38,12 +38,12 @@ proc `$`(x: uint64): string = for t in 0 .. < half: swap(buf[t], buf[i-t-1]) result = $buf -proc reprStrAux(result: var string, s: string) = +proc reprStrAux(result: var string, s: cstring; len: int) = if cast[pointer](s) == nil: add result, "nil" return add result, reprPointer(cast[pointer](s)) & "\"" - for i in 0..