forked from organicmaps/organicmaps
[ios] Workaround for crash on no locale.
This commit is contained in:
parent
6a4d6c2c18
commit
2c2c4a01dd
1 changed files with 2 additions and 0 deletions
|
@ -127,6 +127,8 @@ void initFieldsMap()
|
|||
}
|
||||
|
||||
NSNumberFormatter * currencyFormatter = [[NSNumberFormatter alloc] init];
|
||||
if (currencyFormatter.currencyCode.length != 3)
|
||||
currencyFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
|
||||
currencyFormatter.numberStyle = NSNumberFormatterCurrencyStyle;
|
||||
currencyFormatter.maximumFractionDigits = 0;
|
||||
string const currency = currencyFormatter.currencyCode.UTF8String;
|
||||
|
|
Loading…
Add table
Reference in a new issue