Browse Source

Fix entrypoint method config entry

Bepis 6 years ago
parent
commit
796c7b0c83
1 changed files with 2 additions and 3 deletions
  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))