XUser: reject an unknown gamertag component #429
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/429"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by davutsimsekk on 2026-11-25T00:43:37Z.
XUserGetGamertagmatched every component other thanModernSuffixand returnedS_OKwith the classic gamertag. The GDK enum has only four values (classic, modern, modern suffix, unique modern); an unknown component is documented asE_INVALIDARG.This returns
E_INVALIDARGfor components 4 and above and leaves the output buffer untouched. The four valid components are unchanged.Test
an_unknown_gamertag_component_is_an_invalid_argumentchecks component 4 through both the gamertag object and the user object, and asserts the buffer was not written. Onmainthe call returnsS_OK.cargo test -p victory-hle --lib: 97 passed, 0 failedcargo clippy -p victory-hle --all-targets --locked -- -D warnings: cleanrustfmt --edition 2024 --check crates/victory-hle/src/modules/xuser.rs: cleanView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.