From e36ab92ecd9428a3e0b61a822f6f7943c10345f9 Mon Sep 17 00:00:00 2001 From: Arthur Date: Fri, 20 Jan 2023 13:17:53 +0100 Subject: [PATCH] Fixed bug where decimal becomes , instead of . --- Tomlet/Models/TomlDouble.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tomlet/Models/TomlDouble.cs b/Tomlet/Models/TomlDouble.cs index 913c42a..b7a0124 100644 --- a/Tomlet/Models/TomlDouble.cs +++ b/Tomlet/Models/TomlDouble.cs @@ -32,7 +32,7 @@ public TomlDouble(double value) {IsInfinity: true} => double.IsPositiveInfinity(Value) ? "inf" : "-inf", {IsNaN: true} => "nan", {HasDecimal: true} => Value.ToString(CultureInfo.InvariantCulture), - _ => $"{Value:F1}" //When no decimal, force a decimal point (.0) to force any consuming tools (including ourselves!) to re-parse as float. + _ => Value.ToString("F1", CultureInfo.InvariantCulture) //When no decimal, force a decimal point (.0) to force any consuming tools (including ourselves!) to re-parse as float. }; public override string SerializedValue => StringValue;