summaryrefslogtreecommitdiff
path: root/src/SMAPI.Common
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-01-12 01:24:49 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-01-12 01:24:49 -0500
commit0ad9fbddddbf9edfd847c507d70e10d2f8ce559b (patch)
treea7bf3bd2b04767bbb0ad9c23fdb3e7ea0edee895 /src/SMAPI.Common
parentdc2ceb39f31c35752c943b5052d5abaa7b6494fa (diff)
downloadSMAPI-0ad9fbddddbf9edfd847c507d70e10d2f8ce559b.tar.gz
SMAPI-0ad9fbddddbf9edfd847c507d70e10d2f8ce559b.tar.bz2
SMAPI-0ad9fbddddbf9edfd847c507d70e10d2f8ce559b.zip
fix semantic versions always ignoring `-0` tag (#421)
Diffstat (limited to 'src/SMAPI.Common')
-rw-r--r--src/SMAPI.Common/SemanticVersionImpl.cs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/SMAPI.Common/SemanticVersionImpl.cs b/src/SMAPI.Common/SemanticVersionImpl.cs
index 53cf5a21..1c713b47 100644
--- a/src/SMAPI.Common/SemanticVersionImpl.cs
+++ b/src/SMAPI.Common/SemanticVersionImpl.cs
@@ -190,9 +190,7 @@ namespace StardewModdingAPI.Common
private string GetNormalisedTag(string tag)
{
tag = tag?.Trim();
- if (string.IsNullOrWhiteSpace(tag) || tag == "0") // '0' from incorrect examples in old SMAPI documentation
- return null;
- return tag;
+ return !string.IsNullOrWhiteSpace(tag) ? tag : null;
}
}
}