Skip to content

Commit

Permalink
terminal: fix text buffer bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
vroland committed May 6, 2020
1 parent f032ef7 commit dce84df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/terminal/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ int calculate_horizontal_advance(GFXfont* font, Line line, int col) {


void tmoveto(int x, int y) {
term.cursor.x = min(max(x, 0), COLUMNS);
term.cursor.y = min(max(y, 0), ROWS);
term.cursor.x = min(max(x, 0), COLUMNS - 1);
term.cursor.y = min(max(y, 0), ROWS - 1);
}

void tputc(uint32_t chr) {
Expand Down

0 comments on commit dce84df

Please sign in to comment.