"subwin() made the subwindow one row/line too small when fed nlines=0

or ncols=0.", by B.G.
This commit is contained in:
William McBrine
2023-06-26 01:44:33 -04:00
parent 201799a9ee
commit 601c9373ef

View File

@@ -344,9 +344,9 @@ WINDOW *subwin(WINDOW *orig, int nlines, int ncols, int begy, int begx)
k = begx - orig->_begx;
if (!nlines)
nlines = orig->_maxy - 1 - j;
nlines = orig->_maxy - j;
if (!ncols)
ncols = orig->_maxx - 1 - k;
ncols = orig->_maxx - k;
win = PDC_makenew(nlines, ncols, begy, begx);
if (!win)