Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion ParseClasses.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,21 @@ public class Release

public System.Version GetVersion()
{
System.Version version;
string parsed = this.tag_name.ToLower().Replace("v", "");
return new System.Version(parsed);
int pos;
pos = parsed.IndexOf("-");
if (pos != -1) parsed = parsed.Substring(0, pos);
pos = parsed.IndexOf("+");;
if (pos != -1) parsed = parsed.Substring(0, pos);
try {
version = new System.Version(parsed);
}
catch (FormatException ex){
PolyTechMain.ptfInstance.ptfLogger.LogError("Invalid Version found while checking for mod updates, using fallback value 0.0.0");
version = new System.Version("0.0.0");
}
return version;
}
}

Expand Down
2 changes: 1 addition & 1 deletion PolyTechMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class PolyTechMain : PolyTechMod
public new const string
PluginGuid = "polytech.polytechframework",
PluginName = "PolyTech Framework",
PluginVersion = "0.9.1";
PluginVersion = "0.9.2";
private static BindingList<PolyTechMod>
noncheatMods = new BindingList<PolyTechMod> { },
cheatMods = new BindingList<PolyTechMod> { };
Expand Down