Skip to content

Improved logic for whether to apply commands at link time#56

Merged
RoadrunnerWMC merged 1 commit intoTreeki:masterfrom
RoadrunnerWMC:link_time_commands_logic
Mar 16, 2026
Merged

Improved logic for whether to apply commands at link time#56
RoadrunnerWMC merged 1 commit intoTreeki:masterfrom
RoadrunnerWMC:link_time_commands_logic

Conversation

@RoadrunnerWMC
Copy link
Collaborator

This PR makes the logic for KamekFile.Contains() more accurate by adding a check for the address type, and updates call sites to remove the now-redundant check.

It also changes the logic for RelocCommand.Apply() to use the updated Contains method instead of only checking the address type. Since the rest of the function assumes that it's safe to write into the file as long as that initial check passed, which is only actually true if the file Contains the address in question, this logic is more accurate, even if it's not currently possible to actually generate relocations that violate that assumption. (It will become possible once #54 is merged.)

@RoadrunnerWMC RoadrunnerWMC merged commit 5514654 into Treeki:master Mar 16, 2026
@RoadrunnerWMC RoadrunnerWMC deleted the link_time_commands_logic branch March 16, 2026 08:00
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.

1 participant