Skip to content

Remove redundant OpCode in UNTIL loop#3164

Open
DBooots wants to merge 2 commits intoKSP-KOS:developfrom
DBooots:patch-3
Open

Remove redundant OpCode in UNTIL loop#3164
DBooots wants to merge 2 commits intoKSP-KOS:developfrom
DBooots:patch-3

Conversation

@DBooots
Copy link

@DBooots DBooots commented Feb 19, 2026

Fixes #3094

Added try-catch block to OpcodeBranchIfTrue and OpcodeBranchIfFalse to capture the protection that was presumably the root cause of the not -> branchIfFalse logic. Then removed the redundant Not opcode in favor of the equivalent logic using OpcodeBranchIfTrue.

Added error handling for type conversion in branch instructions to align with the not opcode.
See KSP-KOS#3094
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redundancy in compiled form of UNTIL

1 participant