X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8458e9a72389eef2a76e66d2b427e490ba92c9e6..3f316b0bda61b18136122406677a2e728af01171:/stglibs/common.lib/common.cpp 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; } //---------------------------------------------------------------------------