gh-154855: Ask non-ncurses curses for one more character (GH-154870)
Passing n to the library is ncurses' reading of n: it stores n characters and adds a terminator. NetBSD curses counts the terminator in n. Ask a library that is neither ncurses nor PDCurses for n + 1, and read again if it stored more than asked; truncating could split a multibyte character. This is not possible for input, so getstr() and get_wstr() are left as they are. instr() now takes the length from the value returned by winnstr(), as X/Open specifies, instead of searching for a terminator which it does not.
S
Serhiy Storchaka committed
43a1869f7eea006f04647d4225d5fda80cb3fbd9
Parent: be87bfa
Committed by GitHub <noreply@github.com>
on 8/23/2026, 12:31:51 PM