fix: fix string formatting of Coordinates when given null provider

This commit is contained in:
Oliver Booth 2024-02-16 00:34:31 +00:00
parent f6a68ad4cd
commit 6cca6e6072
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ public readonly partial struct Coordinates : IEquatable<Coordinates>, IFormattab
/// <returns>A <see cref="string" /> representation of these coordinates.</returns> /// <returns>A <see cref="string" /> representation of these coordinates.</returns>
public string ToString(string? format, IFormatProvider? formatProvider = null) public string ToString(string? format, IFormatProvider? formatProvider = null)
{ {
format ??= "{0}"; format ??= "0";
return Serializer.Serialize(this, format, formatProvider ?? CultureInfo.InvariantCulture); return Serializer.Serialize(this, format, formatProvider ?? CultureInfo.InvariantCulture);
} }
} }