mirror of
https://github.com/dnwSilver/tld.git
synced 2025-01-19 17:32:07 +00:00
🐛 Fix bug with unstable version.
This commit is contained in:
parent
5eda85d006
commit
28b4480f30
@ -14,8 +14,25 @@ public class Version
|
|||||||
{
|
{
|
||||||
var parts = version.Split('.');
|
var parts = version.Split('.');
|
||||||
|
|
||||||
|
if (parts.Length == 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Major = Convert.ToInt32(parts[0].RemoveVersionPrefix());
|
Major = Convert.ToInt32(parts[0].RemoveVersionPrefix());
|
||||||
|
|
||||||
|
if (parts.Length == 1)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Minor = Convert.ToInt32(parts[1]);
|
Minor = Convert.ToInt32(parts[1]);
|
||||||
|
|
||||||
|
if (parts.Length == 2)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Patch = Convert.ToInt32(string.Join("", parts[2].TakeWhile(char.IsDigit)));
|
Patch = Convert.ToInt32(string.Join("", parts[2].TakeWhile(char.IsDigit)));
|
||||||
|
|
||||||
var extension = parts[2].Replace(Patch.ToString(), "");
|
var extension = parts[2].Replace(Patch.ToString(), "");
|
||||||
|
Loading…
Reference in New Issue
Block a user