From 7ca4d854416ae663825bfc7d84c5df0288a7ce41 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Wed, 10 Jan 2024 17:48:47 +0300 Subject: [PATCH] Remove unnecessary `AllowThousands` flag The flag is there to match `float.Parse` behaviour, but it's too illogical and unnecessary to have it. --- osu.Game/Skinning/LegacyManiaSkinDecoder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Skinning/LegacyManiaSkinDecoder.cs b/osu.Game/Skinning/LegacyManiaSkinDecoder.cs index 720b05a0b1..ff6e7fc38e 100644 --- a/osu.Game/Skinning/LegacyManiaSkinDecoder.cs +++ b/osu.Game/Skinning/LegacyManiaSkinDecoder.cs @@ -155,7 +155,7 @@ namespace osu.Game.Skinning if (i >= output.Length) break; - if (!float.TryParse(values[i], NumberStyles.Float | NumberStyles.AllowThousands, CultureInfo.InvariantCulture, out float parsedValue)) + if (!float.TryParse(values[i], NumberStyles.Float, CultureInfo.InvariantCulture, out float parsedValue)) // some skins may provide incorrect entries in array values. to match stable behaviour, read such entries as zero. // see: https://github.com/ppy/osu/issues/26464, stable code: https://github.com/peppy/osu-stable-reference/blob/3ea48705eb67172c430371dcfc8a16a002ed0d3d/osu!/Graphics/Skinning/Components/Section.cs#L134-L137 parsedValue = 0;