Skip to content

Commit

Permalink
Don't overwrite border of window
Browse files Browse the repository at this point in the history
  • Loading branch information
newsch committed May 29, 2019
1 parent 6af4ea6 commit 70a4742
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 70a4742

Please sign in to comment.