Skip to content

Commit 678a7d9

Browse files
committed
Revert "Fix a counter bug that could produce a crash in custom builds."
This reverts commit 4dc4236.
1 parent 4c9f3cf commit 678a7d9

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

KSPCommunityFixes/BugFixes/ModuleIndexingMismatch.cs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -472,17 +472,9 @@ static IEnumerable<CodeInstruction> ShipConstruct_LoadShip_Transpiler(IEnumerabl
472472
Debug.LogError($"Error applying ModuleIndexingMismatch patch : couldn't find Part.LoadModule() call in ShipConstruct.LoadShip()");
473473
return instructions;
474474
}
475-
uint minusCount;
476-
if (!KSPCommunityFixes.cleanedDll)
477-
{
478-
minusCount = 6;
479-
}
480-
else
481-
{
482-
minusCount = 5;
483-
}
484-
// then, insert our own module loading call before the original part nodes parsing loop
485-
for (int i = 0; i < code.Count - minusCount; i++)
475+
476+
// then, insert our own module loading call before the original part nodes parsing loop
477+
for (int i = 0; i < code.Count - 6; i++)
486478
{
487479
//// int moduleIndex = 0;
488480
// ldc.i4.0 NULL

0 commit comments

Comments
 (0)