From 54808ab12fcbf8cc253129ed03f560fc6dd2648e Mon Sep 17 00:00:00 2001 From: Arne Döring Date: Mon, 7 Aug 2017 18:21:21 +0200 Subject: don't filter '\0' characters in string generation --- compiler/rodutils.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler') diff --git a/compiler/rodutils.nim b/compiler/rodutils.nim index 3a90a207c..6e77e6b8f 100644 --- a/compiler/rodutils.nim +++ b/compiler/rodutils.nim @@ -22,7 +22,7 @@ proc toStrMaxPrecision*(f: BiggestFloat, literalPostfix = ""): string = else: result = "-INF" else: var buf: array[0..80, char] - let newLen = c_snprintf(buf.cstring, buf.len.uint, "%#.16e%s", f, literalPostfix.cstring) + discard c_snprintf(buf.cstring, buf.len.uint, "%#.16e%s", f, literalPostfix.cstring) result = $buf.cstring proc encodeStr*(s: string, result: var string) = -- cgit 1.4.1-2-gfad0