Skip to content

Fix ConditionOp.strictEqual handling#11813

Merged
Anuken merged 1 commit intoAnuken:masterfrom
cardillan:condition-strict-equal
Mar 31, 2026
Merged

Fix ConditionOp.strictEqual handling#11813
Anuken merged 1 commit intoAnuken:masterfrom
cardillan:condition-strict-equal

Conversation

@cardillan
Copy link
Copy Markdown
Contributor

@cardillan cardillan commented Mar 31, 2026

The jump instrucion uses reference comparison to compare objects using strictEqual, while op instruction uses Structs.eq to compare objects using strictEqual. This fix removes the disparity by switching to Structs.eq even for jump instructions.

Note that reference comparison has the downside that it treats two identical strings as different. With the availability of read and write for processor variables, different instances of the same string may easily occur in a processor, leading to incorrect comparison of strings using strictEqual in a jump instruction.

If your pull request is not translation or serverlist-related, read the list of requirements below and check each box:

  • I have read the contribution guidelines.
  • I have ensured that my code compiles, if applicable.
  • I have ensured that any new features in this PR function correctly in-game, if applicable.

@Anuken Anuken merged commit b3e009b into Anuken:master Mar 31, 2026
2 checks passed
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.

2 participants