Skip to content

Commit

Permalink
Merge pull request #73 from NathanKell/fixDoubleCurveTranspiler
Browse files Browse the repository at this point in the history
Fix DoubleCurve transpiler
  • Loading branch information
NathanKell committed Aug 6, 2022
2 parents b902241 + e78133e commit 07de803
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions KSPCommunityFixes/BugFixes/DoubleCurvePreserveTangents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ static IEnumerable<CodeInstruction> DoubleCurve_RecomputeTangents_Transpiler(IEn
List<CodeInstruction> code = new List<CodeInstruction>(instructions);
for (int i = 1; i < code.Count; ++i)
{
if (code[i].opcode == OpCodes.Ldc_I4_1 && code[i-1].opcode == OpCodes.Ldloc_1)
if (code[i].opcode == OpCodes.Ldc_I4_1 && code[i - 1].opcode == OpCodes.Ldloc_1)
{
code[i].opcode = OpCodes.Ldc_I4_M1;
code[i + 1] = new CodeInstruction(OpCodes.Ret);
break;
}
}
Expand Down

0 comments on commit 07de803

Please sign in to comment.