Add Vector3.Zero return on TryParseConsoleVector() which fails on mono 2.4.3 but not mono 2.10.9

0.7.4-extended
Justin Clark-Casey (justincc) 2012-10-05 03:58:52 +01:00
parent 2905eaa8ff
commit 45dc7ac7d1
1 changed files with 3 additions and 0 deletions

View File

@ -83,7 +83,10 @@ public class ConsoleUtil
List<string> components = rawConsoleVector.Split(VectorSeparatorChars).ToList(); List<string> components = rawConsoleVector.Split(VectorSeparatorChars).ToList();
if (components.Count < 1 || components.Count > 3) if (components.Count < 1 || components.Count > 3)
{
vector = Vector3.Zero;
return false; return false;
}
for (int i = components.Count; i < 3; i++) for (int i = components.Count; i < 3; i++)
components.Add(""); components.Add("");