mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-25 08:15:27 +00:00
"subwin() made the subwindow one row/line too small when fed nlines=0
or ncols=0.", by B.G.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user