NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/55433: Bug in special character handling of ins_wstr() of libcurses



>Number:         55433
>Category:       lib
>Synopsis:       Bug in special character handling of ins_wstr() of libcurses
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 30 10:05:00 +0000 2020
>Originator:     Naman Jain
>Release:        NetBSD 9.0
>Organization:
IIT Kanpur
>Environment:
NetBSD localhost 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64

>Description:
int main() {
    initscr();
    wchar_t wstr[] = {'A', '\n', 'A', L'\0'};
    ins_wstr(wstr);
    refresh();
    getch();
    endwin();
    return 0;
}

This code should result into 2 As, one at the start of first-line(0,0) and second at the start of second-line(1,0). Instead, it prints only a single A that too at (0,1).
Similarly, it shows unexpected behavior for \r also. For wstr[] = {'A', '\r', 'B', L'\0'}, the expected behaviour is a single B but it displays AB.


>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index