判断int型异常
This commit is contained in:
parent
40b6205abc
commit
65f2b0af0a
@ -84,7 +84,7 @@ namespace Assets.Scripts
|
||||
{
|
||||
//iPhone2,1
|
||||
var s = info.Replace("iPhone", "").Split(',');
|
||||
return s.Length == 2 && int.Parse(s[0]) < 9;
|
||||
return s.Length == 2 && int.TryParse(s[0],out int gen) && gen < 9;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user