Change natural comparer to respect negative numbers

This commit is contained in:
David Vierra 2015-02-26 18:53:55 -10:00
parent db5d2a05c0
commit 7a151d3e6f

View file

@ -29,11 +29,11 @@ namespace NBTExplorer.Utility
}
string[] x1, y1;
if (!table.TryGetValue(x, out x1)) {
x1 = Regex.Split(x.Replace(" ", ""), "([0-9]+)");
x1 = Regex.Split(x.Replace(" ", ""), "(-?[0-9]+)");
table.Add(x, x1);
}
if (!table.TryGetValue(y, out y1)) {
y1 = Regex.Split(y.Replace(" ", ""), "([0-9]+)");
y1 = Regex.Split(y.Replace(" ", ""), "(-?[0-9]+)");
table.Add(y, y1);
}