git.stg.codes
/
stg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8458e9a
)
Fixed x2str for doubles.
author
Maxim Mamontov
<faust.madf@gmail.com>
Thu, 29 May 2014 14:36:54 +0000
(17:36 +0300)
committer
Maxim Mamontov
<faust.madf@gmail.com>
Fri, 9 Jan 2015 19:58:05 +0000
(21:58 +0200)
stglibs/common.lib/common.cpp
patch
|
blob
|
history
diff --git
a/stglibs/common.lib/common.cpp
b/stglibs/common.lib/common.cpp
index dab99605a71fe6a16d6c83db60a88f86825f4101..db2ff6b3e555e768127eb7943594b378cf4b4525 100644
(file)
--- 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;
}
//---------------------------------------------------------------------------