patches/last-exit-03-format.diff
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 481 a52a8b994cae
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name

--- last-exit-5.orig/src/FindStation.cs	2007年  9月 10日 一 22:04:13
+++ last-exit-5/src/FindStation.cs	2007年  9月 10日 一 22:36:53
@@ -461,7 +461,14 @@
 
 				NumberFormatInfo match_fmt = new NumberFormatInfo();
 				match_fmt.NumberDecimalSeparator = ".";
-				double match = Double.Parse (get_node_text (t_node, "match"), match_fmt);
+				match_fmt.NumberGroupSeparator = ",";
+				double match = Double.NaN;
+				try {
+					match = Double.Parse (get_node_text (t_node, "match"), match_fmt);
+				}
+				catch (FormatException) {
+					pass;
+				}
 
 				Tag t = new Tag (id, name, match);
 				tags.Add (t);