fix: Fixes TryParse for Race (#1244)
This commit is contained in:
parent
03fb36c869
commit
8e0d01d4be
1 changed files with 2 additions and 6 deletions
|
|
@ -137,12 +137,8 @@ public abstract class Race : ISpanParsable<Race>
|
||||||
{
|
{
|
||||||
if (int.TryParse(s, out var index) && index >= 0 && index < Races.Length)
|
if (int.TryParse(s, out var index) && index >= 0 && index < Races.Length)
|
||||||
{
|
{
|
||||||
var race = Races[index];
|
result = Races[index];
|
||||||
if (race != null)
|
return result != null;
|
||||||
{
|
|
||||||
result = default;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
s = s.Trim();
|
s = s.Trim();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue