XGameUI: maxTextLength=0 is a limit of 1024 characters (#248) #306
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!306
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/306/head"
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?
@carlos-seiffert on GitHub · 2026-11-24 23:27 UTC · original
carlos-seiffert:fix/xgameui-text-limit-default→main· +49 −4 · 1 files · 1 commits · closed without mergingFixes #248.
Summary
crates/victory-hle/src/modules/xgameui.rs,text_entry_asyncnow turns amaxTextLengthof 0 into the documented 1024 characters (GDK reference) once, at entry.EM_LIMITTEXT, which previously got 0, the edit control's own near-unlimited default) and the trimming of the result.limitno longer has a "0 means no limit" case.Tests
zero_length_limit_is_1024_characters: the test dialog answers 1030 characters with a limit of 0, and 1024 characters plus the NUL come back. Without the change it fails (left: 1, right: 1025).cargo test -p victory-hle: 96 passed, 0 failed (Windows 11, Rust 1.98.1, MSVC).cargo clippy -p victory-hle --all-targets: nothing in this file.Only the new lines follow
rustfmt.toml's 100 columns. The rest of the file was already wider, and I left it as is to keep the diff small.🤖 Generated with Claude Code
@carlos-seiffert on GitHub · 2026-11-24 23:30 UTC · original
Closing as a duplicate of #291, which was opened a few minutes earlier with the same fix (0 → 1024 at entry, one limit for the dialog and the result) and an equivalent test. Sorry for the noise.
Pull request closed