HLE: parse hex-prefixed TitleId in manifest and isolate self-closing element bodies #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?
Imported from Marvisak/VIctory. Originally posted by Super-cod on 2026-11-24T07:37:00Z.
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.Imported from Marvisak/VIctory. Originally posted by cj5k9dnkfd-afk on 2026-11-24T07:38:22Z.
Hi anyone have the game Link
Imported from Marvisak/VIctory. Originally posted by Super-cod on 2026-11-24T07:43:03Z.
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.
Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T07:50:35Z.
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.
Imported from Marvisak/VIctory. Originally posted by undeadhuman37 on 2026-11-24T08:16:08Z.
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.Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T08:28:46Z.
Implemented and verified: