From 2c4db83d719c4f2c036c6ac2aac5d87e8fc89853 Mon Sep 17 00:00:00 2001 From: icetbr Date: Sun, 31 Jan 2021 13:50:50 -0300 Subject: [PATCH] trying to fix error where plugin keeps turning itself off --- Advisor/AdvisorPlugin.cs | 2 +- Advisor/ExtensionMethods.cs | 1 + Advisor/Properties/AssemblyInfo.cs | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Advisor/AdvisorPlugin.cs b/Advisor/AdvisorPlugin.cs index b061548..d85004d 100644 --- a/Advisor/AdvisorPlugin.cs +++ b/Advisor/AdvisorPlugin.cs @@ -80,7 +80,7 @@ public void OnUpdate() { } - public Version Version => new Version(1, 3, 2); + public Version Version => new Version(1, 3, 3); public async Task CheckForUpdate() { diff --git a/Advisor/ExtensionMethods.cs b/Advisor/ExtensionMethods.cs index dac128b..0edc783 100644 --- a/Advisor/ExtensionMethods.cs +++ b/Advisor/ExtensionMethods.cs @@ -69,6 +69,7 @@ public static int CountUnion(this Deck thisDeck, IList cards) public static int GetPlayedGames(this Deck thisDeck) { string[] infos = thisDeck.Note.Split('-'); + if (infos.Length <= 0) return 0; var success = int.TryParse(infos[1], out int result); return success ? result : 0; } diff --git a/Advisor/Properties/AssemblyInfo.cs b/Advisor/Properties/AssemblyInfo.cs index 95dd5d8..e19359b 100644 --- a/Advisor/Properties/AssemblyInfo.cs +++ b/Advisor/Properties/AssemblyInfo.cs @@ -31,5 +31,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.3.0.0")] -[assembly: AssemblyFileVersion("1.3.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("1.3.3.0")] +[assembly: AssemblyFileVersion("1.3.3.0")] \ No newline at end of file