Skip to content

Remove redundant OpCode in UNTIL loop#3164

Merged
JonnyOThan merged 2 commits into
KSP-KOS:developfrom
DBooots:patch-3
May 9, 2026
Merged

Remove redundant OpCode in UNTIL loop#3164
JonnyOThan merged 2 commits into
KSP-KOS:developfrom
DBooots:patch-3

Conversation

@DBooots
Copy link
Copy Markdown
Contributor

@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
@JonnyOThan JonnyOThan merged commit e3bec32 into KSP-KOS:develop May 9, 2026
@JonnyOThan JonnyOThan added this to the v1.5.2.0 milestone May 9, 2026
@DBooots DBooots deleted the patch-3 branch May 9, 2026 16:04
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

2 participants