From: Maxim Mamontov Date: Thu, 29 May 2014 14:36:54 +0000 (+0300) Subject: Fixed x2str for doubles. X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/e2febecbf870fcad830d00d2908f0febb5a2ea93?ds=sidebyside Fixed x2str for doubles. --- 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; } //---------------------------------------------------------------------------