From 3f316b0bda61b18136122406677a2e728af01171 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Thu, 29 May 2014 17:36:54 +0300 Subject: [PATCH] Fixed x2str for doubles. --- stglibs/common.lib/common.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stglibs/common.lib/common.cpp b/stglibs/common.lib/common.cpp index dab99605..db2ff6b3 100644 --- a/stglibs/common.lib/common.cpp +++ b/stglibs/common.lib/common.cpp @@ -793,7 +793,8 @@ return unsigned2str(x, s); const std::string & x2str(double x, std::string & s) { char buf[256]; -s = snprintf(buf, sizeof(buf), "%f", x); +snprintf(buf, sizeof(buf), "%f", x); +s = buf; return s; } //--------------------------------------------------------------------------- -- 2.44.2