diff --git a/pdcurses/window.c b/pdcurses/window.c index 28d90ac8..70f94b71 100644 --- a/pdcurses/window.c +++ b/pdcurses/window.c @@ -354,9 +354,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)