aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/SString.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/SString.h')
-rw-r--r--include/SString.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/SString.h b/include/SString.h
index ff97c0c76..2f096bfb0 100644
--- a/include/SString.h
+++ b/include/SString.h
@@ -91,9 +91,9 @@ public:
s = StringDup(number);
sSize = sLen = (s) ? strlen(s) : 0;
}
- SString(double d) : sizeGrowth(sizeGrowthDefault) {
+ SString(double d, int precision) : sizeGrowth(sizeGrowthDefault) {
char number[32];
- sprintf(number, "%.6f", d);
+ sprintf(number, "%.*f", precision, d);
s = StringDup(number);
sSize = sLen = (s) ? strlen(s) : 0;
}