From 3044fdd0a9d104145991689b229cf4492f453e08 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 10 Sep 2013 21:24:32 -0500 Subject: [PATCH] Use %f instead of %g in AST dumps - To ensure that floating point constants are identifiable as floating point, FLispString::AddFloat() now prints them with %f. --- src/zscript/ast.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zscript/ast.cpp b/src/zscript/ast.cpp index dc9422cf4..bdb1d429c 100644 --- a/src/zscript/ast.cpp +++ b/src/zscript/ast.cpp @@ -155,7 +155,7 @@ public: void AddFloat(double f) { char buf[32]; - size_t len = mysnprintf(buf, countof(buf), "%g", f); + size_t len = mysnprintf(buf, countof(buf), "%.4f", f); Add(buf, len); } private: