XGameUI: maxTextLength=0 is a limit of 1024 characters (#248) #306
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/306"
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 fxceless/victory-fork. Originally posted by carlos-seiffert on 2026-11-24T23:27:45Z.
Fixes #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
Imported from fxceless/victory-fork. Originally posted by carlos-seiffert on 2026-11-24T23:30:43Z.
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