Sfoglia il codice sorgente

Fix entrypoint method config entry

Bepis 6 anni fa
parent
commit
796c7b0c83
1 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  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))