curses_get_wid(NHW_MENU or NHW_TEXT) exceeds array bounds
Status: Beta
Brought to you by:
karlos
curses_get_wid(NHW_MENU) selects an even number at least 20 for the window ID; curses_get_wid(NHW_TEXT) selects an odd number at least 21. Either one attempts to validate the new window ID with curses_window_exists. curses_window_exists uses the ID as an index to the array nhwins. But nhwins has only four elements.
I use the curses interface as part of nethack-i18n and just had a game crash because of this bug. Luckily I had core dumps turned on.