terminal: fix signed overflow warning

This commit is contained in:
King Kévin 2019-06-12 15:05:37 +02:00
parent 204458145e
commit 77ea70aa3a
1 changed files with 1 additions and 1 deletions

View File

@ -149,7 +149,7 @@ static void terminal_process_escape(void)
break;
}
uint16_t terminal_line_new = 0; // new line start
for (uint16_t pos = 0; pos < terminal_line - 1 && pos < LENGTH(terminal_buffer); pos++) { // find for the last line before the current
for (uint16_t pos = 0; pos + 1 < terminal_line && pos < LENGTH(terminal_buffer); pos++) { // find for the last line before the current
if ('\0' == terminal_buffer[pos]) { // new line found
terminal_line_new = pos + 1; // save new line
}