diff --git a/lib/tty/tty.c b/lib/tty/tty.c index 1999deb00..68317e75e 100644 --- a/lib/tty/tty.c +++ b/lib/tty/tty.c @@ -179,6 +179,9 @@ tty_draw_box (int y, int x, int ys, int xs, gboolean single) { int y2, x2; + if (ys <= 0 || xs <= 0) + return; + ys--; xs--;