1.1 --- a/Hardware/Heatmaster/Heatmaster.cs Tue Mar 15 17:55:11 2011 +0000
1.2 +++ b/Hardware/Heatmaster/Heatmaster.cs Tue Mar 15 21:54:56 2011 +0000
1.3 @@ -227,9 +227,15 @@
1.4 if (int.TryParse(match.Groups[1].Value, out device)) {
1.5 foreach (string s in match.Groups[2].Value.Split('|')) {
1.6 string[] strings = s.Split(':');
1.7 - int[] ints = new int[strings.Length];
1.8 + int[] ints = new int[strings.Length];
1.9 + bool valid = true;
1.10 for (int i = 0; i < ints.Length; i++)
1.11 - ints[i] = int.Parse(strings[i], CultureInfo.InvariantCulture);
1.12 + if (!int.TryParse(strings[i], out ints[i])) {
1.13 + valid = false;
1.14 + break;
1.15 + }
1.16 + if (!valid)
1.17 + continue;
1.18 switch (device) {
1.19 case 32:
1.20 if (ints.Length == 3 && ints[0] <= fans.Length) {