瀏覽代碼

Default build version to 0 if it's not defined

ghorsington 4 年之前
父節點
當前提交
0d6c8057d6
共有 1 個文件被更改,包括 1 次插入1 次删除
  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 { }