From 33fcd112360c60078ae7ee4ddb93cbe9f44393bd Mon Sep 17 00:00:00 2001 From: Simon Hafner Date: Tue, 11 Feb 2014 17:00:22 -0600 Subject: [PATCH] add a trailing zero to $float --- lib/system/sysstr.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/system/sysstr.nim b/lib/system/sysstr.nim index a6a555c082..eb9d2000ba 100644 --- a/lib/system/sysstr.nim +++ b/lib/system/sysstr.nim @@ -254,6 +254,8 @@ proc nimFloatToStr(x: float): string {.compilerproc.} = var buf: array [0..59, char] c_sprintf(buf, "%#.f", x) result = $buf + if result[len(result)-1] == '.': + result.add("0") proc nimInt64ToStr(x: int64): string {.compilerRtl.} = result = newString(sizeof(x)*4)