From e2febecbf870fcad830d00d2908f0febb5a2ea93 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 622f64f7..c27a387d 100644 --- a/stglibs/common.lib/common.cpp +++ b/stglibs/common.lib/common.cpp @@ -823,7 +823,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