Skip to content

Commit

Permalink
Fix key collision crash in some searches. Add version to About dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaquadro committed Sep 16, 2014
1 parent d3e53ac commit fc63457
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 16 deletions.
2 changes: 1 addition & 1 deletion NBTExplorer.Installer/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Product Id="*"
Name="NBTExplorer"
Language="1033"
Version="2.7.4.0"
Version="2.7.5.0"
Manufacturer="Justin Aquadro"
UpgradeCode="0bfb1026-21f2-4552-ad71-ca90aae10a25">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
Expand Down
4 changes: 2 additions & 2 deletions NBTExplorer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.7.4.0")]
[assembly: AssemblyFileVersion("2.7.4.0")]
[assembly: AssemblyVersion("2.7.5.0")]
[assembly: AssemblyFileVersion("2.7.5.0")]
5 changes: 3 additions & 2 deletions NBTExplorer/SearchWorker.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using NBTExplorer.Model;

namespace NBTExplorer
Expand Down Expand Up @@ -52,12 +53,12 @@ public bool TestNode (DataNode node)
if (SearchName != null) {
string tagName = node.NodeName;
if (tagName != null)
mName = tagName.Contains(SearchName);
mName = CultureInfo.InvariantCulture.CompareInfo.IndexOf(tagName, SearchName, CompareOptions.IgnoreCase) >= 0;
}
if (SearchValue != null) {
string tagValue = node.NodeDisplay;
if (tagValue != null)
mValue = tagValue.Contains(SearchValue);
mValue = CultureInfo.InvariantCulture.CompareInfo.IndexOf(tagValue, SearchValue, CompareOptions.IgnoreCase) >= 0;
}

if (mName && mValue) {
Expand Down
12 changes: 4 additions & 8 deletions NBTExplorer/Windows/About.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions NBTExplorer/Windows/About.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ public partial class About : Form
public About ()
{
InitializeComponent();

int len = linkLabel1.Text.Length;
System.Version version = typeof(About).Assembly.GetName().Version;

linkLabel1.Text = linkLabel1.Text.Replace("{ver}", version.Major + "." + version.Minor + "." + version.Build);

int adj = linkLabel1.Text.Length - len;
linkLabel1.LinkArea = new LinkArea(linkLabel1.LinkArea.Start + adj, linkLabel1.LinkArea.Length);
}

private void linkLabel1_LinkClicked (object sender, LinkLabelLinkClickedEventArgs e)
Expand Down
10 changes: 10 additions & 0 deletions NBTExplorer/Windows/About.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="linkLabel1.Text" xml:space="preserve">
<value>NBTExplorer {ver}
Copyright ©2011-2014 Justin Aquadro

NBTExplorer is based on NBTEdit by copyboy
Fugue icon set: p.yusukekamiyamane.com

Email: [email protected]
NBTExplorer Github Project Page</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Expand Down
2 changes: 1 addition & 1 deletion NBTModel/Data/TagKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public int Compare (TagKey x, TagKey y)
if (typeDiff != 0)
return typeDiff;

return String.Compare(x.Name, y.Name, true);
return String.Compare(x.Name, y.Name, false);
}

#endregion
Expand Down
4 changes: 2 additions & 2 deletions NBTModel/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.0")]
[assembly: AssemblyFileVersion("1.0.2.0")]
[assembly: AssemblyVersion("1.0.3.0")]
[assembly: AssemblyFileVersion("1.0.3.0")]

0 comments on commit fc63457

Please sign in to comment.