Changeset - r16291:e11d1bc654e8
[Not reviewed]
master
0 1 0
rubidium - 14 years ago 2010-10-22 16:30:09
rubidium@openttd.org
(svn r21009) -Fix: for the compact notation 1.000.000k and 1.000M would be shown depending on the initial (and later rounded) value. Make everything that would round to 1.000.000k be drawn as 1.000M as well.
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/strings.cpp
Show inline comments
 
@@ -339,7 +339,9 @@ static char *FormatGenericCurrency(char 
 

	
 
	/* for huge numbers, compact the number into k or M */
 
	if (compact) {
 
		if (number >= 1000000000) {
 
		/* Take care of the 'k' rounding. Having 1 000 000 k
 
		 * and 1 000 M is inconsistent, so always use 1 000 M. */
 
		if (number >= 1000000000 - 500) {
 
			number = (number + 500000) / 1000000;
 
			multiplier = "M";
 
		} else if (number >= 1000000) {
0 comments (0 inline, 0 general)