HLE: parse hex-prefixed TitleId in manifest and isolate self-closing element bodies #715
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#715
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Super-cod on GitHub · 2026-11-24 07:37 UTC · original
Problem
Hex-prefixed
TitleId: In Microsoft GDK manifests (MicrosoftGame.config),<TitleId>is specified as a hexadecimal number and is frequently formatted with a0xor0Xprefix (e.g.<TitleId>0x639AA8DD</TitleId>), as documented in the Microsoft GDK specification and sample configs. InTitle::from_manifest(),u32::from_str_radix(v, 16)is called directly on the extracted string. Because Rust'sfrom_str_radixrejects0x/0Xprefixes withParseIntError(InvalidDigit), any manifest using this format fails to parse, defaultingTitle.idto 0. Consequently:runtime::title().idreports 0 (00000000).XGameGetTitleIdreturns 0.data/00000000/saves/instead of the title's real ID.Self-closing elements in
elements(): When an element is self-closing (<tag ... />),elements()currently computeslet body = rest[..rest.find('<').unwrap_or(rest.len())].trim()and attaches any text between the self-closing tag and the next tag as the body of the self-closing element. A self-closing tag has no body by definition; assigning subsequent text or whitespace to it corrupts element extraction.Solution
Title::from_manifest, strip"0x"/"0X"prefixes fromGame/TitleIdbefore callingu32::from_str_radix(v, 16).elements(), setbody = String::new()whenclosedis true.runtime::testsfor hex-prefixedTitleIdformats and self-closing element body isolation.@cj5k9dnkfd-afk on GitHub · 2026-11-24 07:38 UTC · original
Hi anyone have the game Link
@Super-cod on GitHub · 2026-11-24 07:43 UTC · original
I have implemented the fix with regression tests on my fork:
github.com/Super-cod/VIctory@5678a37Branch: https://github.com/Super-cod/VIctory/tree/fix/manifest-title-id-hex-prefix
Fork PR: https://github.com/Super-cod/VIctory/pull/1
Summary of changes:
untime::elements() get an empty body instead of capturing trailing sibling text.
untime::tests.
@LAKSHYA-cmd-tech on GitHub · 2026-11-24 07:50 UTC · original
Tested and verified commit
5678a37on Windows 11 MSVC (Rust 1.98.1):runtime::tests::parses_title_id_with_hex_prefixespasses cleanly for0x,0X, and bare hex formats.runtime::tests::self_closing_elements_do_not_capture_trailing_textpasses, ensuring self-closing tags assign empty bodies and do not consume subsequent sibling text.victory-hletest suite (88 tests) passes.cargo xtask policyok: 151 files).Ready to be merged once upstream PR interactions open up.
@undeadhuman37 on GitHub · 2026-11-24 08:16 UTC · original
Hi, I'd like to contribute to VIctory. I have a tested fix for this issue (hex-prefixed TitleId, +1 test; 294 workspace tests pass,
cargo xtask policyclean, no game data) on my fork: undeadhuman37/VIctory, branchfix-715-hex-titleid(commit e402d4b). PRs seem closed for outside contributors. Can I send it as a PR, or would you prefer to pull the branch? The fix was written with AI assistance (Claude Code) and tested locally.@LAKSHYA-cmd-tech on GitHub · 2026-11-24 08:28 UTC · original
Implemented and verified: