#82 subpad() tests incorrectly for position

open
nobody
None
5
2012-02-22
2012-02-22
John P. Hartmann
No

The test below fails with the ncurses menu package because newpad() sets window origin -1, -1 and post_menu() creates a subpad that is the same size as the pad [which also seems a bit odd].

/* make sure window fits inside the original one */

if ((begy < orig->_begy) || (begx < orig->_begx) ||
(begy + nlines) > (orig->_begy + orig->_maxy) ||
(begx + ncols) > (orig->_begx + orig->_maxx))
return (WINDOW *)NULL;

Discussion