Fix IDE0075

This commit is contained in:
RoosterDragon
2023-02-19 12:35:15 +00:00
committed by Pavel Penev
parent 3402031399
commit 99c289e063
3 changed files with 5 additions and 2 deletions

View File

@@ -89,7 +89,7 @@ namespace OpenRA.Mods.Common.Traits
// Check if color has a (valid) alpha value.
// Note: We can't throw on "rgba.Length > 3 but parse failed", because in GIMP palettes the 'invalid' value is probably a color name string.
var noAlpha = rgba.Length > 3 ? !byte.TryParse(rgba[3], out a) : true;
var noAlpha = rgba.Length <= 3 || !byte.TryParse(rgba[3], out a);
// Index should be completely transparent/background color
if (i == TransparentIndex)