From 7a151d3e6f8a8f8fa6d07bcd4114b7dec3099d9e Mon Sep 17 00:00:00 2001 From: David Vierra Date: Thu, 26 Feb 2015 18:53:55 -1000 Subject: [PATCH] Change natural comparer to respect negative numbers --- NBTModel/Utility/NaturalComparer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NBTModel/Utility/NaturalComparer.cs b/NBTModel/Utility/NaturalComparer.cs index e59f7f6..d3f7b35 100644 --- a/NBTModel/Utility/NaturalComparer.cs +++ b/NBTModel/Utility/NaturalComparer.cs @@ -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); }