A low-level ncurses wrapper for Rust
Hi Jeaye I recently ran into a segmentation fault when displaying text from a file with ncurses. After playing around a bit I found out that percentage signs in the strings to be displayed caused this behaviour. Now I'm wondering if this is a feature of which I haven't heard before, or if it is a bug. If it's a feature, the could you please point me to some doc I can study? I found the following funny output: - When my string contains %p, then something that looks like an address is printed - When my string contains %s, the whole string seems to be repeated where the %s is - When my string contains twice a %s, I get the segmentation fault (maybe some recursion?) Here's an example to reproduce (uncommenting the 'killer' line leads to segmenation fault): extern crate ncurses; fn main() { ncurses::initscr(); ncurses::keypad(ncurses::stdscr(), true); ncurses::clear(); let texts = vec![ "Hello, World!", "A line with a %p percentage sign.", "Another funny %s example.", //"The killer %s %s maybe a recursion?", "Bye bye" ]; let mut y = 0; for t in texts { ncurses::mvprintw(y, 0, &t); y += 1; } ncurses::getch(); ncurses::endwin(); } This produces the following output: ``` Hello, World! A line with a 0x60b13d5ae080 percentage sign. Another funny Another funny %s example. example. Bye bye ``` (I run all that on Fedora Linux) Kind regards Peter
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by OldPeasant and has received 8 comments.