1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-10-27 18:20:13 -04:00

Add some asserts to newtxwin(), just to be on the safe side

This commit is contained in:
John Zaitseff 2011-08-19 17:20:41 +10:00
parent aeaf08a8a4
commit 6fb62460ca

View File

@ -484,6 +484,11 @@ WINDOW *newtxwin (int nlines, int ncols, int begin_y, int begin_x,
begin_x = (ncols == 0) ? 0 : (COLS - ncols) / 2;
}
assert(nlines > 0);
assert(ncols > 0);
assert(begin_y >= 0);
assert(begin_x >= 0);
// Create the new window
win = newwin(nlines, ncols, begin_y, begin_x);