Update check fix.
This commit is contained in:
parent
afff86fb29
commit
64e8270cab
|
@ -78,7 +78,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
JObject response = JObject.Parse(DownloadURLAsString(_latestVersionInfoURL));
|
JObject response = JObject.Parse(DownloadURLAsString(_latestVersionInfoURL));
|
||||||
|
|
||||||
LatestVersion = (string)response["name"];
|
LatestVersion = ValidateVersionNumberString((string)response["name"]);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
@ -100,6 +100,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
return responseStream.ReadToEnd();
|
return responseStream.ReadToEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string ValidateVersionNumberString(string versionNumber)
|
||||||
|
{
|
||||||
|
return versionNumber != null && ParseVersion(versionNumber) != 0 ? versionNumber : "";
|
||||||
|
}
|
||||||
|
|
||||||
// Major version goes in the first 16 bits, and so on, up to 4 parts
|
// Major version goes in the first 16 bits, and so on, up to 4 parts
|
||||||
private static ulong ParseVersion(string str)
|
private static ulong ParseVersion(string str)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue