Browse Source

Default build version to 0 if it's not defined

ghorsington 3 years ago
parent
commit
0d6c8057d6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      BepInEx.Core/Contract/Attributes.cs

+ 1 - 1
BepInEx.Core/Contract/Attributes.cs

@@ -53,7 +53,7 @@ namespace BepInEx
 			{
 				var longVersion = new System.Version(version);
 
-				return new SemVer.Version(longVersion.Major, longVersion.Minor, longVersion.Build);
+				return new SemVer.Version(longVersion.Major, longVersion.Minor, longVersion.Build != -1 ? longVersion.Build : 0);
 			}
 			catch { }