判断int型异常
This commit is contained in:
1 parent
40b6205abc
commit
65f2b0af0a
1 file changed
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user