(svn r16144) -Fix (r16129): setting the custom digit grouping separator required to restart OpenTTD to take effect. Now also support non 1 ASCII character custom grouping separators.

This commit is contained in:
rubidium
2009-04-25 20:16:56 +00:00
parent a2d47a4a79
commit f64e9ce4a1
5 changed files with 36 additions and 42 deletions

View File

@@ -336,10 +336,7 @@ static char *FormatGenericCurrency(char *buff, const CurrencySpec *spec, Money n
}
const char *separator = _settings_game.locale.digit_group_separator_currency;
if (separator == NULL && _currency->separator != '\0') {
static char sep[] = { _currency->separator, '\0' };
separator = sep;
}
if (separator == NULL && !StrEmpty(_currency->separator)) separator = _currency->separator;
if (separator == NULL) separator = _langpack->digit_group_separator_currency;
buff = FormatNumber(buff, number, last, separator);
buff = strecpy(buff, multiplier, last);