Skip to content

Commit

Permalink
Fixed bug where decimal becomes , instead of .
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur committed Jan 20, 2023
1 parent c39dbdb commit e36ab92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tomlet/Models/TomlDouble.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e36ab92

Please sign in to comment.