XUser: reject an unknown gamertag component #429

Open
github-bot wants to merge 1 commit from github-bot/gh-429 into main AGit
Owner

@⁠davutsimsekk on GitHub · 2026-11-25 00:43 UTC · original
davutsimsekk:fix/xuser-gamertag-component → main · +18 −1 · 1 files · 1 commits · open

XUserGetGamertag matched every component other than ModernSuffix and returned S_OK with the classic gamertag. The GDK enum has only four values (classic, modern, modern suffix, unique modern); an unknown component is documented as E_INVALIDARG.

This returns E_INVALIDARG for components 4 and above and leaves the output buffer untouched. The four valid components are unchanged.

Test

an_unknown_gamertag_component_is_an_invalid_argument checks component 4 through both the gamertag object and the user object, and asserts the buffer was not written. On main the call returns S_OK.

  • cargo test -p victory-hle --lib: 97 passed, 0 failed
  • cargo clippy -p victory-hle --all-targets --locked -- -D warnings: clean
  • rustfmt --edition 2024 --check crates/victory-hle/src/modules/xuser.rs: clean
  • No game data or GPU was used.
**@⁠davutsimsekk** on GitHub · 2026-11-25 00:43 UTC · [original](https://github.com/fxceless/victory-fork/pull/429) `davutsimsekk:fix/xuser-gamertag-component` → `main` · +18 −1 · 1 files · 1 commits · open `XUserGetGamertag` matched every component other than `ModernSuffix` and returned `S_OK` with the classic gamertag. The GDK enum has only four values (classic, modern, modern suffix, unique modern); an unknown component is documented as `E_INVALIDARG`. This returns `E_INVALIDARG` for components 4 and above and leaves the output buffer untouched. The four valid components are unchanged. ## Test `an_unknown_gamertag_component_is_an_invalid_argument` checks component 4 through both the gamertag object and the user object, and asserts the buffer was not written. On `main` the call returns `S_OK`. - `cargo test -p victory-hle --lib`: 97 passed, 0 failed - `cargo clippy -p victory-hle --all-targets --locked -- -D warnings`: clean - `rustfmt --edition 2024 --check crates/victory-hle/src/modules/xuser.rs`: clean - No game data or GPU was used.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:43:08 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/429/head:github-bot/gh-429'
git switch 'github-bot/gh-429'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-429'
git switch 'github-bot/gh-429'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-429'
git switch 'github-bot/gh-429'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-429'
git switch 'main'
git merge --squash 'github-bot/gh-429'
git switch 'main'
git merge --ff-only 'github-bot/gh-429'
git switch 'main'
git merge 'github-bot/gh-429'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.