summaryrefslogtreecommitdiff
path: root/lib/String.cc
diff options
context:
space:
mode:
authorpixel <pixel>2005-12-01 14:30:04 +0000
committerpixel <pixel>2005-12-01 14:30:04 +0000
commitb79cbd8243c8cdfe8f54f087ae8dc4ad0e2647cb (patch)
treea23a05933682064c52a6bd24bb62dc207b8b66aa /lib/String.cc
parent318920b1b30f8a63e5e3bbb8dcadc895fbf49739 (diff)
Slightly better way to handle doubles in strings.
Diffstat (limited to 'lib/String.cc')
-rw-r--r--lib/String.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/String.cc b/lib/String.cc
index 8bc5bdc..b63b216 100644
--- a/lib/String.cc
+++ b/lib/String.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: String.cc,v 1.39 2005-11-09 09:11:43 pixel Exp $ */
+/* $Id: String.cc,v 1.40 2005-12-01 14:30:04 pixel Exp $ */
#include <stdio.h>
#include <string.h>
@@ -125,7 +125,7 @@ String::String(Uint64 l) {
String::String(double d) {
#ifndef HAVE_ASPRINTF
char t[30];
- sprintf(t, "%g", d);
+ sprintf(t, "%.14g", d);
str = Base::strdup(t);
#else
asprintf(&str, "%g", d);