diff --git a/Il2CppInspector.Common/Outputs/CSharpCodeStubs.cs b/Il2CppInspector.Common/Outputs/CSharpCodeStubs.cs index b2213cf..4f5bdd2 100644 --- a/Il2CppInspector.Common/Outputs/CSharpCodeStubs.cs +++ b/Il2CppInspector.Common/Outputs/CSharpCodeStubs.cs @@ -205,7 +205,7 @@ namespace Il2CppInspector.Outputs var results = new ConcurrentBag>(); // Generate each type - Parallel.ForEach(types, new ParallelOptions { MaxDegreeOfParallelism = Environment.ProcessorCount / 2 }, + Parallel.ForEach(types, new ParallelOptions { MaxDegreeOfParallelism = Math.Max(Environment.ProcessorCount / 2, 1) }, () => new Dictionary(), (type, _, dict) => { // Skip namespace and any children if requested