aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/tbi/win.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/tbi/win.c b/lib/tbi/win.c
index e3ba31e..bf674a2 100644
--- a/lib/tbi/win.c
+++ b/lib/tbi/win.c
@@ -7,6 +7,10 @@
#include "screen.h"
#include "win.h"
+#define CHECK_POSITION(win, x, y) \
+ if(x < 0 || y < 0 || x >= w->width || y >= w->height) \
+ return FALSE
+
struct window *newwin(struct screen *s,
INT32 ncols, INT32 nlines, INT32 begin_x, INT32 begin_y)
{