summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/strings.cpp')
-rw-r--r--src/strings.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index 777d5ccf4..fcc8df60e 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -116,10 +116,11 @@ void SetDParamMaxValue(uint n, uint64 max_value, uint min_count, FontSize size)
*/
void SetDParamMaxDigits(uint n, uint count, FontSize size)
{
- uint biggest_digit = GetBroadestDigit(size);
- uint64 val = biggest_digit;
+ uint front, next;
+ GetBroadestDigit(&front, &next, size);
+ uint64 val = count > 1 ? front : next;
for (; count > 1; count--) {
- val = 10 * val + biggest_digit;
+ val = 10 * val + next;
}
SetDParam(n, val);
}