Skip to content

Commit

Permalink
Merge pull request #14 from DavidCarbon/master
Browse files Browse the repository at this point in the history
Fix Insider Build Version Comparisons
  • Loading branch information
Zacam authored Feb 27, 2023
2 parents 3721f77 + 584e55c commit 6dd965e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

namespace GameLauncherUpdater.App.Classes.UpdaterCore.Support
{
class Strings
public static class Strings
{
public static string Encode(string Value)
public static string Encode(this string Value)
{
return Encoding.UTF8.GetString(Encoding.UTF8.GetBytes(Value));
}
Expand All @@ -25,7 +25,7 @@ public static string Encode(string Value)
/// <b>1</b> if v1 is higher version number than v2<br></br>
/// <b>-1000</b> if we couldn't figure it out (something went wrong)
/// </returns>
public static int Comparisons(string v1, string v2)
public static int Comparisons(this string v1, string v2)
{
if (string.IsNullOrWhiteSpace(v1) || string.IsNullOrWhiteSpace(v2))
{
Expand Down
4 changes: 2 additions & 2 deletions GameLauncherUpdater/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
[assembly: ComVisible(false)]
[assembly: Guid("c3dfd242-2688-4228-88e8-d4588cba1833")]

[assembly: AssemblyVersion("1.0.1.18")]
[assembly: AssemblyFileVersion("1.0.1.18")]
[assembly: AssemblyVersion("1.0.1.20")]
[assembly: AssemblyFileVersion("1.0.1.20")]
[assembly: NeutralResourcesLanguage("en-US")]
4 changes: 2 additions & 2 deletions GameLauncherUpdater/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private static GitHubReleaseSchema Insider_Release_Tag(string JSON_Data, string
Temp_Latest_Launcher_Build = GH_Releases;
}

if (Current_Launcher_Build.CompareTo(GH_Releases.tag_name) < 0)
if (Current_Launcher_Build.Comparisons(GH_Releases.tag_name) < 0)
{
return GH_Releases;
}
Expand Down Expand Up @@ -254,7 +254,7 @@ public void DoUpdate()
Insider_Release_Tag(JSONFile, Version) :
new JavaScriptSerializer().Deserialize<GitHubReleaseSchema>(JSONFile);
int Revision = UsingDevelopment ?
Version_Build.CompareTo(LatestLauncherBuild.tag_name) : Strings.Comparisons(Version, LatestLauncherBuild.tag_name);
Version_Build.CompareTo(LatestLauncherBuild.tag_name) : Version.Comparisons(LatestLauncherBuild.tag_name);
if (Revision < 0)
{
WebClient client2 = new WebClient();
Expand Down

0 comments on commit 6dd965e

Please sign in to comment.