summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-04-17 17:17:09 +0000
committerfrosch <frosch@openttd.org>2011-04-17 17:17:09 +0000
commitf4649c7ce7686a642eacb84e38ca3ac7e5bb8dd3 (patch)
treea5ee7ec9370079aa80c3332a50421c2825ac13a2 /src
parentb1286bbcdafb350335dee0acd31dcf0b85e82811 (diff)
downloadopenttd-f4649c7ce7686a642eacb84e38ca3ac7e5bb8dd3.tar.xz
(svn r22336) -Fix (r22304): {DECIMAL} printed too many thousand separators.
Diffstat (limited to 'src')
-rw-r--r--src/strings.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index edcfbb53a..148790425 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -262,7 +262,7 @@ static char *FormatNumber(char *buff, int64 number, const char *last, const char
}
if (tot |= quot || i >= max_digits - zerofill) {
buff += seprintf(buff, last, "%i", (int)quot);
- if ((i % 3) == thousands_offset && i != max_digits - 1) buff = strecpy(buff, separator, last);
+ if ((i % 3) == thousands_offset && i < max_digits - 1 - fractional_digits) buff = strecpy(buff, separator, last);
}
divisor /= 10;