Describe the bug
cursive programs exit immediately when asked to display a string with a null byte. No error message is shown, and there doesn't seem to be a panic
To Reproduce
MWE:
This program should display a TextView, but instead it exists without any complaint.
use cursive::{views::TextView, Cursive, CursiveExt};
fn main() {
let mut app = Cursive::new();
app.add_layer(TextView::new("Hello Nullbyte: \0"));
app.add_global_callback('q', |a| a.quit());
app.run();
}
Expected behavior
This program should display a TextView, or at least panic with an error message, so that users of cursive know that null bytes are not allowed
Screenshots
no screenshot available
Environment
- Ubuntu Linux
- Backend used: ncurses (the default one)
- de_DE.UTF-8
- 0.20.0
Additional context
I found this while fixing janstarke/regview#8