summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/SemanticVersion.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-07-23 13:15:28 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-07-23 13:15:28 -0400
commit74be6f13114e8e4cb8421a684009d160c4e861f1 (patch)
tree7d04c349d6a6977bf083dc11546244aea0259780 /src/StardewModdingAPI/SemanticVersion.cs
parent5cf961ab64d0b894f8934288ffac92ea1fb8da95 (diff)
downloadSMAPI-74be6f13114e8e4cb8421a684009d160c4e861f1.tar.gz
SMAPI-74be6f13114e8e4cb8421a684009d160c4e861f1.tar.bz2
SMAPI-74be6f13114e8e4cb8421a684009d160c4e861f1.zip
improve handling of legacy non-semantic game versions (#333)
Diffstat (limited to 'src/StardewModdingAPI/SemanticVersion.cs')
-rw-r--r--src/StardewModdingAPI/SemanticVersion.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/SemanticVersion.cs b/src/StardewModdingAPI/SemanticVersion.cs
index f30c43cd..782a962b 100644
--- a/src/StardewModdingAPI/SemanticVersion.cs
+++ b/src/StardewModdingAPI/SemanticVersion.cs
@@ -117,8 +117,7 @@ namespace StardewModdingAPI
{
// compare numerically if possible
{
- int curNum, otherNum;
- if (int.TryParse(curParts[i], out curNum) && int.TryParse(otherParts[i], out otherNum))
+ if (int.TryParse(curParts[i], out int curNum) && int.TryParse(otherParts[i], out int otherNum))
return curNum.CompareTo(otherNum);
}