Browse Source

terminal: fix off-by-one in mouse handling that allowed selection beyond valid screen area

K. Lange 3 years ago
parent
commit
401fa2b279
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apps/terminal.c

+ 1 - 1
apps/terminal.c

@@ -2124,7 +2124,7 @@ static void * handle_incoming(void) {
 					new_y /= char_height;
 
 					if (new_x < 0 || new_y < 0) break;
-					if (new_x > term_width || new_y > term_height) break;
+					if (new_x >= term_width || new_y >= term_height) break;
 
 					/* Map Cursor Action */
 					if (ansi_state->mouse_on) {