From: Maxim Mamontov Date: Thu, 29 May 2014 14:36:54 +0000 (+0300) Subject: Fixed x2str for doubles. X-Git-Tag: 2.409~318 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/3f316b0bda61b18136122406677a2e728af01171 Fixed x2str for doubles. --- 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; } //---------------------------------------------------------------------------