don't use country specific decimal separators for decimals

This commit is contained in:
Matthias Mailänder
2014-07-23 06:19:45 +02:00
parent cffb1f27e4
commit 32a4bedd6e

View File

@@ -69,6 +69,8 @@ namespace OpenRA
// Don't save floats in settings.yaml using country-specific decimal separators which can be misunderstood as group seperators. // Don't save floats in settings.yaml using country-specific decimal separators which can be misunderstood as group seperators.
if (t == typeof(float)) if (t == typeof(float))
return ((float)v).ToString(CultureInfo.InvariantCulture); return ((float)v).ToString(CultureInfo.InvariantCulture);
if (t == typeof(decimal))
return ((decimal)v).ToString(CultureInfo.InvariantCulture);
if (t == typeof(Rectangle)) if (t == typeof(Rectangle))
{ {