ucrt: print %a with the CRT's default precision of 13 #73
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!73
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-73"
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?
@Olima34 on GitHub · 2026-11-26 13:41 UTC · original
Olima34:fix/ucrt-printf-hex-precision→main· +9 −3 · 1 files · 2 commits · merged 2026-11-26 15:29 UTCWhat this changes
Without a precision,
%atrimmed the trailing zeros of the mantissa as glibc does (0x1p+0). Microsoft's format specification givesa,A"Default precision is 13", so the CRT writes0x1.0000000000000p+0. A precision of 0 still drops the point unless#is given. The%acases of the existing format test are updated, and%.0a/%#.0aare added.How it was tested
cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory(all pass, native probe tests included)cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings, also with--all-features; clippy forx86_64-apple-darwinreports nothing in the files touched (host_posixis not built for Windows)cargo test --workspaceandcargo xtask policymainand passes with the changeChecklist
VICTORY_*variable and documented (none added)@LakshanSivakumar on GitHub · 2026-11-26 14:55 UTC · original · approved these changes
%a with the default precision of 13 matches UCRT, and %.0a / %#.0a are covered. Thanks.