소스 검색

Fix entrypoint method config entry

Bepis 6 년 전
부모
커밋
796c7b0c83
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      BepInEx/Bootstrap/Preloader.cs

+ 2 - 3
BepInEx/Bootstrap/Preloader.cs

@@ -219,9 +219,8 @@ namespace BepInEx.Bootstrap
 		public static void PatchEntrypoint(ref AssemblyDefinition assembly)
 		{
 			string entrypointType = Config.GetEntry("entrypoint-type", "Application", "Preloader");
-			string entrypointMethod = Config.HasEntry("entrypoint-method")
-				? Config.GetEntry("entrypoint-method", section: "Preloader")
-				: "";
+			string entrypointMethod = Config.GetEntry("entrypoint-method", ".cctor", "Preloader");
+			
 			bool isCctor = entrypointMethod.IsNullOrWhiteSpace() || entrypointMethod == ".cctor";
 			
 			using (var injected = AssemblyDefinition.ReadAssembly(Paths.BepInExAssemblyPath))