1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 21:52:54 +08:00

Use more explicit match

`taiko-bar-right-glow` is a prefix of `taiko-bar-right`...
This commit is contained in:
Bartłomiej Dach 2024-02-06 14:53:01 +01:00
parent 27b97a3c4d
commit c21af1bf3d
No known key found for this signature in database

View File

@ -61,8 +61,11 @@ namespace osu.Game.Skinning
{
// unfortunately at this level of lookup we can encounter `@2x` scale suffixes in the name,
// so straight equality cannot be used.
if (name.StartsWith(grayscaleSprite, StringComparison.OrdinalIgnoreCase))
if (name.Equals(grayscaleSprite, StringComparison.OrdinalIgnoreCase)
|| name.Equals($@"{grayscaleSprite}@2x", StringComparison.OrdinalIgnoreCase))
{
return true;
}
}
return false;