Skip to content

Patch: Clean up PatchCommand struct - #14789

Open
chaoticgd wants to merge 1 commit into
PCSX2:masterfrom
chaoticgd:patch_command_ub
Open

Patch: Clean up PatchCommand struct#14789
chaoticgd wants to merge 1 commit into
PCSX2:masterfrom
chaoticgd:patch_command_ub

Conversation

@chaoticgd

Copy link
Copy Markdown
Member

Description of Changes

Clean up the PatchCommand struct.

Rationale behind Changes

The trick it was previously using where you memset/memcmp the whole struct isn't valid, since the compiler is allowed to overwrite padding when combining writes. In practice clang seems to be conservative about this, but we shouldn't be relying on it.

Suggested Testing Steps

Make sure bytes patches still work as expected.

Did you use AI to help find, test, or implement this issue or feature?

No.

@Mrlinkwii Mrlinkwii added this to the Release 2.10 milestone Jul 29, 2026
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