XUser: a gamertag without a suffix has an empty modern suffix #229
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/229"
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 Marvisak/VIctory. Originally posted by Dufftwt on 2026-11-24T01:38:32Z.
What's wrong
XUserGetGamertagtakes a component,XUserGamertagComponent:ClassicModernModernSuffixUniqueModernOur user, "Player", has no suffix.
get_gamertagignores the component and returns"Player"for all four, including the suffix. A title that shows the suffix whenever it isn't empty (name#suffix, the usual way to display a modern gamertag) shows:What the fix does
get_gamertagreturns an empty string (just the NUL,used= 1) forModernSuffix(2), and the name for every other component, as before.How it behaves after the fix
The user shows as
Player. The classic, modern and unique modern components are stillPlayer, and the suffix is empty, as for any account without a suffix. Both slots that reachget_gamertag, the gamertag interface's and the older one on the user interface, give the same result.Tests
The new test
a_gamertag_without_a_suffix_has_an_empty_modern_suffixreads all four components through both slots. It expectsPlayer\0for 0, 1 and 3, and\0for 2.I ran
cargo test --workspaceon GitHub'swindows-latestwith Rust 1.98.1 fromrust-toolchain.toml:victory-hlehas 87 passed, the other crates have 0 failed.main: it fails on the suffix:left: [80, 108, 97, 121, 101, 114, 0]("Player\0"),right: [0].--test-threads=1. With 4 threads, the shader crate's GPU tests sometimes crash on that runner (STATUS_ACCESS_VIOLATION), on unmodifiedmainas well.Not tested: how the title displays the name.
Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-24T05:27:53Z.
Thanks @Dufftwt for covering the modern gamertag suffix when the tag has no suffix.
I tested commit
d46b07803c80c6f05ae1738254ec98c7d50529a9with:The targeted test passed (1 passed, 0 failed; 86 filtered).
a_gamertag_without_a_suffix_has_an_empty_modern_suffixchecks classic, modern, modern-suffix, and unique-modern components through both gamertag interface slots. The ordinary components returnPlayer; the modern suffix returns an empty NUL-terminated string.This exercises the HLE interface with its default user fixture; it does not use a real account or online profile.