mirror of
https://git.zap.org.au/git/trader.git
synced 2024-12-04 14:46:45 -05:00
Add some asserts to newtxwin(), just to be on the safe side
This commit is contained in:
parent
aeaf08a8a4
commit
6fb62460ca
@ -484,6 +484,11 @@ WINDOW *newtxwin (int nlines, int ncols, int begin_y, int begin_x,
|
|||||||
begin_x = (ncols == 0) ? 0 : (COLS - ncols) / 2;
|
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
|
// Create the new window
|
||||||
|
|
||||||
win = newwin(nlines, ncols, begin_y, begin_x);
|
win = newwin(nlines, ncols, begin_y, begin_x);
|
||||||
|
Loading…
Reference in New Issue
Block a user