From 70a4742133ba884f50ce4c77c1894e7756486145 Mon Sep 17 00:00:00 2001 From: Evan New-Schmidt Date: Wed, 22 May 2019 17:03:35 -0400 Subject: [PATCH] Don't overwrite border of window --- src/frontend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend.c b/src/frontend.c index 4c6551d..bf7b3bc 100644 --- a/src/frontend.c +++ b/src/frontend.c @@ -333,12 +333,12 @@ void redraw_canvas_win() { } // draw fill in rest of window - for (int x = max_x; x < view_max_x; x++) { + for (int x = max(0, max_x); x < view_max_x; x++) { for (int y = 0; y < view_max_y; y++) { mvwaddch(canvas_win, y + 1, x + 1, ACS_CKBOARD); } } - for (int y = max_y; y < view_max_y; y++) { + for (int y = max(0, max_y); y < view_max_y; y++) { for (int x = 0; x < max_x; x++) { mvwaddch(canvas_win, y + 1, x + 1, ACS_CKBOARD); }